TypeScript/tests/baselines/reference/unusedImports3.js
Wesley Wigham c6c2c4c8d5
Hoist initial assignment to exported names in cjs to they are not blocked by bindings made by __exportStar (#37093)
* Hoist initial assignment to exported names in cjs to they are not blocked by bindings made by __exportStar

* Copy hoisted identifiers so they do not create sourcemaps

* Accept updated baselines
2020-02-28 13:25:28 -08:00

45 lines
812 B
TypeScript

//// [tests/cases/compiler/unusedImports3.ts] ////
//// [file1.ts]
export class Calculator {
handleChar() {}
}
export function test() {
}
export function test2() {
}
//// [file2.ts]
import {Calculator, test, test2} from "./file1"
test();
test2();
//// [file1.js]
"use strict";
exports.__esModule = true;
exports.test2 = exports.test = exports.Calculator = void 0;
var Calculator = /** @class */ (function () {
function Calculator() {
}
Calculator.prototype.handleChar = function () { };
return Calculator;
}());
exports.Calculator = Calculator;
function test() {
}
exports.test = test;
function test2() {
}
exports.test2 = test2;
//// [file2.js]
"use strict";
exports.__esModule = true;
var file1_1 = require("./file1");
file1_1.test();
file1_1.test2();