17 lines
1.2 KiB
Plaintext
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'.
|
|
} |