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

21 lines
1.1 KiB
Plaintext

tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(5,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'.
Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'.
==== tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts (2 errors) ====
class C {
private x = 1;
}
class D extends C { }
function foo(x: "hi", items: string[]): typeof foo;
~~~
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
function foo(x: string, items: string[]): typeof foo {
return null;
}
var a: D = foo("hi", []);
~
!!! error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'.
!!! error TS2322: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'.