Closed IceCola97 closed 3 months ago
This could be implemented without emitting different JS based on the types of the expressions
You mistakingly checked this. Emitting additional JavaScript beyond ECMAScript support is a pretty big No-Go.
This could be implemented without emitting different JS based on the types of the expressions
You mistakingly checked this. Emitting additional JavaScript beyond ECMAScript support is a pretty big No-Go.
Okay, but @decorator(nameof(IInterface))
is also a better way to write it
Okay, but
@decorator(nameof(IInterface))
is also a better way to write it
Which would be the exact same issue: emitting different JavaScript depending on the type.
🔍 Search Terms
"nameof" and "1579"
(i know the issue #1579 and i check the issue #394 and #1003)
✅ Viability Checklist
⭐ Suggestion
Use "nameof(ISomeInterface)" instead of "ISomeInterface". Interface is a type, which means we cannot replace "nameof" by declaring a function:
📃 Motivating Example
This is a specific example to explain why use 'nameof':
I hope the typescript can be written this way instead of the following:
💻 Use Cases