mio codice di prova è simile al seguente:metodo dattiloscritto decoratore non funziona
function test(target: Object, propertyKey: string, descriptor: TypedPropertyDescriptor<any>) {
return descriptor;
}
class Test {
@test
hello() {
}
}
ma il compilatore darmi errore
Error:(33, 5) TS1241: Unable to resolve signature of method decorator when called as an expression. Supplied parameters do not match any signature of call target.
ho già specificato: --experimentalDecorators --emitDecoratorMetadata
funziona per me. con quale versione di dattiloscritto stai compilando? – iberbeu
tsc test.ts --experimentalDecorators --emitDecoratorMetadata – Jeff
@iberbeu tsc --version Versione 1.8.10 – Jeff