TypeScript/tests/cases/compiler/emitDecoratorMetadata_restArgs.ts
Nathan Shively-Sanders 2cc040c666 Test that emitter skips this with rest parameter
Also test that it's skipped when emitting decorator metadata
2016-07-13 11:43:28 -07:00

21 lines
442 B
TypeScript

// @experimentaldecorators: true
// @emitdecoratormetadata: true
// @target: ES5
declare const MyClassDecorator: ClassDecorator;
declare const MyMethodDecorator: MethodDecorator;
@MyClassDecorator
class A {
constructor(...args) {}
@MyMethodDecorator
method(...args) {}
}
@MyClassDecorator
class B {
constructor(...args: number[]) {}
@MyMethodDecorator
method(this: this, ...args: string[]) {}
}