29 lines
902 B
Text
29 lines
902 B
Text
|
==== tests/cases/conformance/externalModules/test/file1.ts (0 errors) ====
|
||
|
import foo = require('foo');
|
||
|
import other = require('./other');
|
||
|
import relMod = require('./sub/relMod');
|
||
|
|
||
|
if(foo.M2.x){
|
||
|
var x = new relMod(other.M2.x.charCodeAt(0));
|
||
|
}
|
||
|
|
||
|
==== tests/cases/conformance/externalModules/test/foo.d.ts (1 errors) ====
|
||
|
export declare module M2 {
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
export var x: boolean;
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
}
|
||
|
~
|
||
|
!!! Cannot compile external modules unless the '--module' flag is provided.
|
||
|
|
||
|
==== tests/cases/conformance/externalModules/test/other.d.ts (0 errors) ====
|
||
|
export declare module M2 {
|
||
|
export var x: string;
|
||
|
}
|
||
|
|
||
|
==== tests/cases/conformance/externalModules/test/sub/relMod.d.ts (0 errors) ====
|
||
|
declare class Test {
|
||
|
constructor(x: number);
|
||
|
}
|
||
|
export = Test;
|
||
|
|