Decorator syntaxSee original GitHub issue
What is the Civet syntax for TS decorators?
const printable = (target: any, memberName: string) => console.log memberName class Person @printable name = 'Jon'
I get the warning
Member 'printMemberName' implicitly has an 'any' type.typescript(7008) because
@ is used for static members.
The Code Sample at the top of the readme contains the
flag in the compiler options, so I assume they are supported.
- Created 10 months ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
I’ve added support for decorators with
@@ syntax instead of
@ is premium real estate and
@ is also static fields/methods, etc.
@ decorator syntax makes it to a standard then maybe I’ll re-evaluate but I’d rather pressure the spec in this direction.
Ideally we could become so popular that the decorator proposal changes before it becomes a standard 😼