mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
319 B
TypeScript
18 lines
319 B
TypeScript
//// [tests/cases/compiler/assignmentCompatOnNew.ts] ////
|
|
|
|
//// [assignmentCompatOnNew.ts]
|
|
class Foo{};
|
|
|
|
function bar(x: {new(): Foo;}){}
|
|
|
|
bar(Foo); // Error, but should be allowed
|
|
|
|
|
|
//// [assignmentCompatOnNew.js]
|
|
"use strict";
|
|
class Foo {
|
|
}
|
|
;
|
|
function bar(x) { }
|
|
bar(Foo); // Error, but should be allowed
|