mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 05:17:43 -05:00
Merge pull request #6683 from Microsoft/strip_quotes_in_modules_names
strip quotes from module names during deduplication
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1'.
|
||||
tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2'.
|
||||
tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3'.
|
||||
tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2'.
|
||||
tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2'.
|
||||
tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1'.
|
||||
tests/cases/compiler/deduplicateImportsInSystem.ts(8,1): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/deduplicateImportsInSystem.ts (7 errors) ====
|
||||
import {A} from "f1";
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find module 'f1'.
|
||||
import {B} from "f2";
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find module 'f2'.
|
||||
import {C} from "f3";
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find module 'f3'.
|
||||
import {D} from 'f2';
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find module 'f2'.
|
||||
import {E} from "f2";
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find module 'f2'.
|
||||
import {F} from 'f1';
|
||||
~~~~
|
||||
!!! error TS2307: Cannot find module 'f1'.
|
||||
|
||||
console.log(A + B + C + D + E + F)
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
33
tests/baselines/reference/deduplicateImportsInSystem.js
Normal file
33
tests/baselines/reference/deduplicateImportsInSystem.js
Normal file
@@ -0,0 +1,33 @@
|
||||
//// [deduplicateImportsInSystem.ts]
|
||||
import {A} from "f1";
|
||||
import {B} from "f2";
|
||||
import {C} from "f3";
|
||||
import {D} from 'f2';
|
||||
import {E} from "f2";
|
||||
import {F} from 'f1';
|
||||
|
||||
console.log(A + B + C + D + E + F)
|
||||
|
||||
//// [deduplicateImportsInSystem.js]
|
||||
System.register(["f1", "f2", "f3"], function(exports_1) {
|
||||
"use strict";
|
||||
var f1_1, f2_1, f3_1, f2_2, f2_3, f1_2;
|
||||
return {
|
||||
setters:[
|
||||
function (f1_1_1) {
|
||||
f1_1 = f1_1_1;
|
||||
f1_2 = f1_1_1;
|
||||
},
|
||||
function (f2_1_1) {
|
||||
f2_1 = f2_1_1;
|
||||
f2_2 = f2_1_1;
|
||||
f2_3 = f2_1_1;
|
||||
},
|
||||
function (f3_1_1) {
|
||||
f3_1 = f3_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
console.log(f1_1.A + f2_1.B + f3_1.C + f2_2.D + f2_3.E + f1_2.F);
|
||||
}
|
||||
}
|
||||
});
|
||||
9
tests/cases/compiler/deduplicateImportsInSystem.ts
Normal file
9
tests/cases/compiler/deduplicateImportsInSystem.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// @module: system
|
||||
import {A} from "f1";
|
||||
import {B} from "f2";
|
||||
import {C} from "f3";
|
||||
import {D} from 'f2';
|
||||
import {E} from "f2";
|
||||
import {F} from 'f1';
|
||||
|
||||
console.log(A + B + C + D + E + F)
|
||||
Reference in New Issue
Block a user