mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
462 B
TypeScript
26 lines
462 B
TypeScript
//// [tests/cases/conformance/importDefer/dynamicImportDefer.ts] ////
|
|
|
|
//// [a.ts]
|
|
export function foo() {
|
|
console.log("foo from a");
|
|
}
|
|
|
|
//// [b.ts]
|
|
import.defer("./a.js").then(ns => {
|
|
ns.foo();
|
|
});
|
|
|
|
|
|
//// [a.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.foo = foo;
|
|
function foo() {
|
|
console.log("foo from a");
|
|
}
|
|
//// [b.js]
|
|
"use strict";
|
|
import.defer("./a.js").then(ns => {
|
|
ns.foo();
|
|
});
|