File: deduplicateImportsInSystem.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (35 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//// [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, context_1) {
    "use strict";
    var f1_1, f2_1, f3_1, f2_2, f2_3, f1_2;
    var __moduleName = context_1 && context_1.id;
    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);
        }
    };
});