mojego kodu testu jest jak następuje:maszynopis dekorator metoda nie działa
function test(target: Object, propertyKey: string, descriptor: TypedPropertyDescriptor<any>) {
return descriptor;
}
class Test {
@test
hello() {
}
}
ale kompilator dać mi błąd
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.
już określone: --experimentalDecorators --emitDecoratorMetadata
to działa na mnie. z którą wersją maszynopisu się kompilujesz? – iberbeu
tsc test.ts --experimentalDecorators --emitDecoratorMetadata – Jeff
@iberbeu tsc --version Wersja 1.8.10 – Jeff