* 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
34 lines
640 B
TypeScript
34 lines
640 B
TypeScript
//// [tests/cases/compiler/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.ts] ////
|
|
|
|
//// [file1.ts]
|
|
export function foo() {
|
|
var classes = undefined;
|
|
return new classes(null);
|
|
}
|
|
|
|
//// [file2.ts]
|
|
import f = require('./file1');
|
|
f.foo();
|
|
|
|
|
|
//// [file1.js]
|
|
"use strict";
|
|
exports.__esModule = true;
|
|
exports.foo = void 0;
|
|
function foo() {
|
|
var classes = undefined;
|
|
return new classes(null);
|
|
}
|
|
exports.foo = foo;
|
|
//// [file2.js]
|
|
"use strict";
|
|
exports.__esModule = true;
|
|
var f = require("./file1");
|
|
f.foo();
|
|
|
|
|
|
//// [file1.d.ts]
|
|
export declare function foo(): any;
|
|
//// [file2.d.ts]
|
|
export {};
|