Files
tsgo/testdata/baselines/reference/submodule/compiler/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt

19 lines
865 B
Plaintext

crashInsourcePropertyIsRelatableToTargetProperty.ts(7,5): error TS2322: Type 'null' is not assignable to type '(x: "hi", items: string[]) => typeof foo'.
crashInsourcePropertyIsRelatableToTargetProperty.ts(9,5): error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'.
==== crashInsourcePropertyIsRelatableToTargetProperty.ts (2 errors) ====
class C {
private x = 1;
}
class D extends C { }
function foo(x: "hi", items: string[]): typeof foo;
function foo(x: string, items: string[]): typeof foo {
return null;
~~~~~~
!!! error TS2322: Type 'null' is not assignable to type '(x: "hi", items: string[]) => typeof foo'.
}
var a: D = foo("hi", []);
~
!!! error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D'.