Tighter parameter decorator checking with --experimentalDecorators
· Issue #52435 · microsoft/TypeScript (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
// @experimentalDecorators: true export declare const Inject: (entity: Function, dataSource?: string) => (target: object, key: string | symbol, index?: number) => void;
export class Foo {}
export class C { constructor(@Inject(Foo) x: any) { } }
Previously: no error
In main
/5.0:
Unable to resolve signature of parameter decorator when called as an expression.
Argument of type 'undefined' is not assignable to parameter of type 'string | symbol'