Syntax error in emitted output from tsc
when exporting value of symbol key
#43154
Labels
Milestone
Comments
@a-tarasyuk thanks for taking a look at this. I noticed another issue with the emitter that will cause a syntax error: const S = '#foo' as const;
class Foo {
static [S](){}
}
export const method = Foo[S]; This emits: |
This is still an issue in main (4903c64) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
syntax error tsc declaration class symbol TS1003 Identifier expected
Every version from 3.3.3 - 4.2.3 and nightly
https://www.typescriptlang.org/play?ts=4.3.0-dev.20210308#code/MYewdgzgLgBAyjAvPAngWwEYgDYAoCUA3AFDDYCGEEMAYiCDAN7EyszTlQCWwMA2nAC6BRgF9i4gKYAPAA4gATrFCRYaSVAAWIACZJa9AYMJA
Output of the
d.ts
follows:There is a syntax error on line 5:
typeof Foo.[S]
A dot should not be emitted when the key is a symbol
The text was updated successfully, but these errors were encountered: