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

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

java - How to handle special characters while unmarshalling xml in JAXB -

4x4 Matrix in Python -