2014-09-12 22:35:07 +02:00
tests/cases/conformance/externalModules/foo_1.ts(2,17): error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'.
2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ====
import foo = require("./foo_0");
var x = new foo(true); // Should error
2014-07-25 02:00:03 +02:00
~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'.
2014-07-13 01:04:16 +02:00
var y = new foo({a: "test", b: 42}); // Should be OK
var z: number = y.test.b;
==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ====
class Foo<T extends {a: string; b:number;}>{
test: T;
constructor(x: T){}
}
export = Foo;