TypeScript/tests/baselines/reference/decoratorOnClassMethod10.errors.txt

17 lines
1.2 KiB
Plaintext
Raw Normal View History

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>'.
2015-03-20 06:57:03 +01:00
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>'.
2015-03-20 06:57:03 +01:00
!!! 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'.
2015-03-17 22:06:06 +01:00
}