-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove unused, always empty fields from TsTypeElement
- TsPropertySignature can not have params, type params, or an initializer. - TsGetterSignature can not be optional or readonly. - TsSetterSignature can not be optional or readonly. - TsMethodSignature can not be readonly.
- Loading branch information
1 parent
e560198
commit d6bc36a
Showing
20 changed files
with
62 additions
and
61 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
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
3 changes: 3 additions & 0 deletions
3
crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.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,3 @@ | ||
export type A = { | ||
get m?(): string; | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts.swc-stderr
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,7 @@ | ||
|
||
x Expected '{', got 'A' | ||
,-[$DIR/tests/typescript-errors/type-lit/optional-getter/input.ts:1:1] | ||
1 | export type A = { | ||
: ^ | ||
2 | get m?(): string; | ||
`---- |
3 changes: 3 additions & 0 deletions
3
crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.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,3 @@ | ||
export type A = { | ||
set m?(val: string); | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts.swc-stderr
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,7 @@ | ||
|
||
x Expected '{', got 'A' | ||
,-[$DIR/tests/typescript-errors/type-lit/optional-setter/input.ts:1:1] | ||
1 | export type A = { | ||
: ^ | ||
2 | set m?(val: string); | ||
`---- |
3 changes: 3 additions & 0 deletions
3
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.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,3 @@ | ||
export type A = { | ||
readonly get m(): string; | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts.swc-stderr
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,7 @@ | ||
|
||
x Expected '{', got 'A' | ||
,-[$DIR/tests/typescript-errors/type-lit/readonly-getter/input.ts:1:1] | ||
1 | export type A = { | ||
: ^ | ||
2 | readonly get m(): string; | ||
`---- |
3 changes: 3 additions & 0 deletions
3
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.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,3 @@ | ||
export type A = { | ||
readonly m(): string; | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts.swc-stderr
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,7 @@ | ||
|
||
x Expected '{', got 'A' | ||
,-[$DIR/tests/typescript-errors/type-lit/readonly-method/input.ts:1:1] | ||
1 | export type A = { | ||
: ^ | ||
2 | readonly m(): string; | ||
`---- |
3 changes: 3 additions & 0 deletions
3
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.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,3 @@ | ||
export type A = { | ||
readonly set m(val: string); | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts.swc-stderr
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,7 @@ | ||
|
||
x Expected '{', got 'A' | ||
,-[$DIR/tests/typescript-errors/type-lit/readonly-setter/input.ts:1:1] | ||
1 | export type A = { | ||
: ^ | ||
2 | readonly set m(val: string); | ||
`---- |
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