mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
865 B
Plaintext
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'.
|
|
|