-
-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(isolated-declarations): improve inferring the type of accessor
- Loading branch information
Showing
3 changed files
with
200 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
crates/oxc_isolated_declarations/tests/fixtures/set-get-accessor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Correct | ||
class Cls { | ||
get a() { | ||
return 1; | ||
} | ||
set a() { | ||
return; | ||
} | ||
|
||
get b(): string { | ||
} | ||
set b(v) { | ||
} | ||
|
||
private get c() {} | ||
private set c() {} | ||
} | ||
|
||
// Incorrect | ||
class ClsBad { | ||
get a() { | ||
return; | ||
} | ||
set a(v) { | ||
} | ||
} |
Oops, something went wrong.