-
Notifications
You must be signed in to change notification settings - Fork 784
Open
Description
Steps to reproduce
tsgo compiles the following code incorrectly. Note the method name in the class:
class A {
@(fakeDecorator as any)
[Symbol()]() {}
}
function fakeDecorator() {}tsconfig:
{
"compilerOptions": {
"module": "nodenext",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"composite": true,
"noImplicitOverride": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"skipLibCheck": true,
"target": "es2023",
"strictPropertyInitialization": false,
"noImplicitAny": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
}
}Behavior with typescript@5.9
Valid code
Behavior with tsgo
Emits a non-existent method name - _a. If you run the compiled code, it throws an error:
], A.prototype, _a, null);
^
ReferenceError: _a is not defined
Copilot
Metadata
Metadata
Assignees
Labels
No labels