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

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -