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

Popular posts from this blog

python - RuntimeError: can't re-enter readline -

python - PyInstaller UAC not working in onefile mode -

ios - Pass NSDictionary from Javascript to Objective-c in JavascriptCore -