28 lines
591 B
TypeScript
28 lines
591 B
TypeScript
//// [tests/cases/conformance/externalModules/typesOnlyExternalModuleStillHasInstance.ts] ////
|
|
|
|
//// [foo_0.ts]
|
|
export interface Person {
|
|
name: string;
|
|
age: number;
|
|
}
|
|
|
|
export module M2 {
|
|
export interface I2 {
|
|
x: Person;
|
|
}
|
|
}
|
|
|
|
//// [foo_1.ts]
|
|
import foo0 = require('./foo_0');
|
|
// Per 11.2.3, foo_0 should still be "instantiated", albeit with no members
|
|
|
|
var x: typeof foo0 = {};
|
|
var y: {M2: Object} = foo0;
|
|
|
|
|
|
//// [foo_0.js]
|
|
//// [foo_1.js]
|
|
var foo0 = require('./foo_0');
|
|
// Per 11.2.3, foo_0 should still be "instantiated", albeit with no members
|
|
var x = {};
|
|
var y = foo0;
|