File: defaultDeclarationEmitDefaultImport.js

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (37 lines) | stat: -rw-r--r-- 977 bytes parent folder | download | duplicates (2)
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
36
37
//// [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";
exports.__esModule = true;
exports.getSomething = void 0;
function getSomething() { return null; }
exports.getSomething = getSomething;
var Something = /** @class */ (function () {
    function Something() {
    }
    return Something;
}());
exports["default"] = Something;
//// [main.js]
"use strict";
exports.__esModule = true;
exports.instance = void 0;
var 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;