Open
Description
TypeScript Version: JavaScript + ESNext
Search Terms: export+experimental+decorators+export
Code
export default
@x
class A {
}
[β ] The above does not work.
@x
class A {}
export default A;
[π ] It does work when going with the old syntax, that is splitting export
statement and class
expression. I.e. this works fine:
Expected behavior:
The syntax should be valid, according to @babel/plugin-proposal-decorators, which is also in line with tc39, as discussed here.
Actual behavior:
The first @
raises:
Expression expected. ts(1109)
Playground Link:
Related Issues:
I previously posted on VSCode issues and was sent here: