TypeScript/tests/baselines/reference/assignmentCompatOnNew.types
2014-08-15 14:37:48 -07:00

15 lines
303 B
Plaintext

=== tests/cases/compiler/assignmentCompatOnNew.ts ===
class Foo{};
>Foo : Foo
function bar(x: {new(): Foo;}){}
>bar : (x: new () => Foo) => void
>x : new () => Foo
>Foo : Foo
bar(Foo); // Error, but should be allowed
>bar(Foo) : void
>bar : (x: new () => Foo) => void
>Foo : typeof Foo