16 lines
704 B
Plaintext
16 lines
704 B
Plaintext
tests/cases/compiler/assignmentCompatability44.ts(5,7): error TS2322: Type 'typeof Foo' is not assignable to type 'new () => Foo'.
|
|
Types of construct signatures are incompatible.
|
|
Type 'new (x: number) => Foo' is not assignable to type 'new () => Foo'.
|
|
|
|
|
|
==== tests/cases/compiler/assignmentCompatability44.ts (1 errors) ====
|
|
class Foo {
|
|
constructor(x: number) {}
|
|
}
|
|
|
|
const foo: { new(): Foo } = Foo;
|
|
~~~
|
|
!!! error TS2322: Type 'typeof Foo' is not assignable to type 'new () => Foo'.
|
|
!!! error TS2322: Types of construct signatures are incompatible.
|
|
!!! error TS2322: Type 'new (x: number) => Foo' is not assignable to type 'new () => Foo'.
|
|
|