You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TS 2.6.2
Runtime environment: node.js 8.9.0, current Browsers
I'm trying to decorate a constructor parameter with a decorator like this:
export function inject<T>(key?: string | ClassInterface<T> | undefined) {
...
return function (target: Object, propertyKey: string | symbol, paramInx: number): any {
...
}
}
Expected behaviour: "propertyKey" should be defined
Actual: It is undefined
I know that this is similar to #15904. The point there is that this feature depends on the ES property declaration proposal. But I would like to reiterate that:
At the moment there is no way of attaining the parameter names of ctors.
This would make various dependcy injection scenarios much easier.
The transpiler is the only place to get ahold of this design time information. There are no good work-arounds.
Even if it is not yet defined in the ES6 proposal: Isn't that what TS is about? Bringing new, useful features to the table and eventually - as ES supports them - transpile them to ES?
Thanks a lot
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TS 2.6.2
Runtime environment: node.js 8.9.0, current Browsers
I'm trying to decorate a constructor parameter with a decorator like this:
Expected behaviour: "propertyKey" should be defined
Actual: It is undefined
I know that this is similar to #15904. The point there is that this feature depends on the ES property declaration proposal. But I would like to reiterate that:
Thanks a lot
The text was updated successfully, but these errors were encountered: