typescript - how to add parameter in parameter decorator? -
i have class this:
export class foocontroller{ constructor( @inject(true) private fooservice: fooservice) { } }
i want implement parameter decorator passing argument on it.
i had tried below approach, doesn't work, giving error "supplied parameter doesn't match signature of call target"
public static inject(isfoo: boolean = false) { return (target: any, key: string, index: number) => { } }
please me issue
Comments
Post a Comment