TypeScript/tests/baselines/reference/decoratorOnClassMethod10.errors.txt
2015-03-23 14:47:07 -07:00

17 lines
1.2 KiB
Plaintext

tests/cases/conformance/decorators/class/method/decoratorOnClassMethod10.ts(4,5): error TS2322: Type '(target: Function, paramIndex: number) => void' is not assignable to type '(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<() => void>) => void | TypedPropertyDescriptor<() => void>'.
Types of parameters 'paramIndex' and 'propertyKey' are incompatible.
Type 'number' is not assignable to type 'string | symbol'.
Type 'number' is not assignable to type 'symbol'.
==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod10.ts (1 errors) ====
declare function dec(target: Function, paramIndex: number): void;
class C {
@dec method() {}
~~~~
!!! error TS2322: Type '(target: Function, paramIndex: number) => void' is not assignable to type '(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<() => void>) => void | TypedPropertyDescriptor<() => void>'.
!!! error TS2322: Types of parameters 'paramIndex' and 'propertyKey' are incompatible.
!!! error TS2322: Type 'number' is not assignable to type 'string | symbol'.
!!! error TS2322: Type 'number' is not assignable to type 'symbol'.
}