-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typescript-estree): align optional fields (#1429)
- Loading branch information
1 parent
b6c3b7b
commit 0e0010f
Showing
8 changed files
with
4,239 additions
and
410 deletions.
There are no files selected for viewing
731 changes: 731 additions & 0 deletions
731
packages/parser/tests/lib/__snapshots__/typescript.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...ges/shared-fixtures/fixtures/typescript/basics/class-with-optional-computed-method.src.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,17 @@ | ||
const computed1 = "buzz"; | ||
const computed2 = "bazz"; | ||
const obj = { | ||
member: "member", | ||
member2: "member2", | ||
}; | ||
class X { | ||
[computed1]?(); | ||
[computed2]?() {}; | ||
[1]?(); | ||
[2]?() {}; | ||
["literal1"]?(); | ||
["literal2"]?() {}; | ||
[obj.member]?() {}; | ||
[obj.member2]?(); | ||
[f()]?() {} | ||
} |
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
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
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
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
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
Oops, something went wrong.