2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/conformance/ambient/consumer.ts (1 errors) ====
|
|
|
|
/// <reference path="decls.ts" />
|
|
|
|
import imp1 = require('equ');
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
|
|
|
|
import imp3 = require('equ2');
|
|
|
|
var n = imp3.x;
|
|
|
|
var n: number;
|
|
|
|
|
|
|
|
==== tests/cases/conformance/ambient/decls.ts (0 errors) ====
|
|
|
|
|
|
|
|
// Ambient external module with export assignment
|
|
|
|
declare module 'equ' {
|
|
|
|
var x;
|
|
|
|
export = x;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module 'equ2' {
|
|
|
|
var x: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Ambient external import declaration referencing ambient external module using top level module name
|