TypeScript/tests/baselines/reference/assignmentCompatOnNew.types
2015-04-15 16:44:20 -07:00

14 lines
303 B
Text

=== 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