mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
927 B
TypeScript
34 lines
927 B
TypeScript
//// [tests/cases/compiler/defaultDeclarationEmitDefaultImport.ts] ////
|
|
|
|
//// [root.ts]
|
|
export function getSomething(): Something { return null as any }
|
|
export default class Something {}
|
|
//// [main.ts]
|
|
import Thing, { getSomething } from "./root";
|
|
export const instance = getSomething();
|
|
|
|
|
|
//// [root.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getSomething = getSomething;
|
|
function getSomething() { return null; }
|
|
class Something {
|
|
}
|
|
exports.default = Something;
|
|
//// [main.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.instance = void 0;
|
|
const root_1 = require("./root");
|
|
exports.instance = (0, root_1.getSomething)();
|
|
|
|
|
|
//// [root.d.ts]
|
|
export declare function getSomething(): Something;
|
|
export default class Something {
|
|
}
|
|
//// [main.d.ts]
|
|
import Thing from "./root";
|
|
export declare const instance: Thing;
|