mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
added tests for import\export elision
This commit is contained in:
parent
1803d730c2
commit
1bdcaa3d43
@ -0,0 +1,28 @@
|
||||
tests/cases/compiler/separateCompilationImportExportElision.ts(2,17): error TS2307: Cannot find external module 'module'.
|
||||
tests/cases/compiler/separateCompilationImportExportElision.ts(3,18): error TS2307: Cannot find external module 'module'.
|
||||
tests/cases/compiler/separateCompilationImportExportElision.ts(4,21): error TS2307: Cannot find external module 'module'.
|
||||
tests/cases/compiler/separateCompilationImportExportElision.ts(12,18): error TS2307: Cannot find external module 'module'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/separateCompilationImportExportElision.ts (4 errors) ====
|
||||
|
||||
import {c} from "module"
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'module'.
|
||||
import {c2} from "module"
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'module'.
|
||||
import * as ns from "module"
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'module'.
|
||||
|
||||
class C extends c2.C {
|
||||
}
|
||||
|
||||
let x = new c();
|
||||
let y = ns.value;
|
||||
|
||||
export {c1} from "module";
|
||||
~~~~~~~~
|
||||
!!! error TS2307: Cannot find external module 'module'.
|
||||
export var z = x;
|
||||
@ -0,0 +1,37 @@
|
||||
//// [separateCompilationImportExportElision.ts]
|
||||
|
||||
import {c} from "module"
|
||||
import {c2} from "module"
|
||||
import * as ns from "module"
|
||||
|
||||
class C extends c2.C {
|
||||
}
|
||||
|
||||
let x = new c();
|
||||
let y = ns.value;
|
||||
|
||||
export {c1} from "module";
|
||||
export var z = x;
|
||||
|
||||
//// [separateCompilationImportExportElision.js]
|
||||
var __extends = this.__extends || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
__.prototype = b.prototype;
|
||||
d.prototype = new __();
|
||||
};
|
||||
var module_1 = require("module");
|
||||
var module_2 = require("module");
|
||||
var ns = require("module");
|
||||
var C = (function (_super) {
|
||||
__extends(C, _super);
|
||||
function C() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
return C;
|
||||
})(module_2.c2.C);
|
||||
var x = new module_1.c();
|
||||
var y = ns.value;
|
||||
var module_3 = require("module");
|
||||
exports.c1 = module_3.c1;
|
||||
exports.z = x;
|
||||
@ -0,0 +1,17 @@
|
||||
// @separateCompilation: true
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
|
||||
// @filename: file1.ts
|
||||
import {c} from "module"
|
||||
import {c2} from "module"
|
||||
import * as ns from "module"
|
||||
|
||||
class C extends c2.C {
|
||||
}
|
||||
|
||||
let x = new c();
|
||||
let y = ns.value;
|
||||
|
||||
export {c1} from "module";
|
||||
export var z = x;
|
||||
Loading…
x
Reference in New Issue
Block a user