mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-09 07:55:10 -05:00
added tests
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/separateCompilationPlainFile-AMD.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/separateCompilationPlainFile-AMD.ts (1 errors) ====
|
||||
|
||||
declare function run(a: number): void;
|
||||
~~~~~~~
|
||||
!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
run(1);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [separateCompilationPlainFile-AMD.ts]
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
|
||||
|
||||
//// [separateCompilationPlainFile-AMD.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
run(1);
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/separateCompilationPlainFile-CommonJS.ts (1 errors) ====
|
||||
|
||||
declare function run(a: number): void;
|
||||
~~~~~~~
|
||||
!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
run(1);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [separateCompilationPlainFile-CommonJS.ts]
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
|
||||
|
||||
//// [separateCompilationPlainFile-CommonJS.js]
|
||||
run(1);
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/separateCompilationPlainFile-ES6.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/separateCompilationPlainFile-ES6.ts (1 errors) ====
|
||||
|
||||
declare function run(a: number): void;
|
||||
~~~~~~~
|
||||
!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
run(1);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [separateCompilationPlainFile-ES6.ts]
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
|
||||
|
||||
//// [separateCompilationPlainFile-ES6.js]
|
||||
run(1);
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/separateCompilationPlainFile-System.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/separateCompilationPlainFile-System.ts (1 errors) ====
|
||||
|
||||
declare function run(a: number): void;
|
||||
~~~~~~~
|
||||
!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
run(1);
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
//// [separateCompilationPlainFile-System.ts]
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
|
||||
|
||||
//// [separateCompilationPlainFile-System.js]
|
||||
System.register([], function(exports_1) {
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
run(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/separateCompilationPlainFile-UMD.ts(2,1): error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
|
||||
|
||||
==== tests/cases/compiler/separateCompilationPlainFile-UMD.ts (1 errors) ====
|
||||
|
||||
declare function run(a: number): void;
|
||||
~~~~~~~
|
||||
!!! error TS1208: Cannot compile non-external modules when the '--separateCompilation' flag is provided.
|
||||
run(1);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
//// [separateCompilationPlainFile-UMD.ts]
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
|
||||
|
||||
//// [separateCompilationPlainFile-UMD.js]
|
||||
(function (deps, factory) {
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
var v = factory(require, exports); if (v !== undefined) module.exports = v;
|
||||
}
|
||||
else if (typeof define === 'function' && define.amd) {
|
||||
define(deps, factory);
|
||||
}
|
||||
})(["require", "exports"], function (require, exports) {
|
||||
run(1);
|
||||
});
|
||||
6
tests/cases/compiler/separateCompilationPlainFile-AMD.ts
Normal file
6
tests/cases/compiler/separateCompilationPlainFile-AMD.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// @target: es5
|
||||
// @module: amd
|
||||
// @separateCompilation: true
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
@@ -0,0 +1,6 @@
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
// @separateCompilation: true
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
5
tests/cases/compiler/separateCompilationPlainFile-ES6.ts
Normal file
5
tests/cases/compiler/separateCompilationPlainFile-ES6.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @target: es6
|
||||
// @separateCompilation: true
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
@@ -0,0 +1,6 @@
|
||||
// @target: es5
|
||||
// @module: system
|
||||
// @separateCompilation: true
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
6
tests/cases/compiler/separateCompilationPlainFile-UMD.ts
Normal file
6
tests/cases/compiler/separateCompilationPlainFile-UMD.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// @target: es5
|
||||
// @module: umd
|
||||
// @separateCompilation: true
|
||||
|
||||
declare function run(a: number): void;
|
||||
run(1);
|
||||
Reference in New Issue
Block a user