Closed
Description
The issue I'm facing is decorated declare or abstract fields are causing an Error: Decorators are not valid here
. After some inspection it seems that esbuild
supported this until version 0.19.8
Is this no longer supported?
Code example:
function log(target: any, key: string): void {
console.log(`Logging ${key} function`)
}
abstract class ExampleClass {
@log
abstract prop1: string
@log
prop2: boolean = true
}
class ExampleClass2 extends ExampleClass {
prop1: string = "world"
}
Esbuild result:
✘ [ERROR] Decorators are not valid here
entry.ts:6:2:
6 │ @log
╵ ^
Some playground links:
Metadata
Metadata
Assignees
Labels
No labels