File: es3defaultAliasIsQuoted.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (35 lines) | stat: -rw-r--r-- 1,007 bytes parent folder | download
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
//// [tests/cases/compiler/es3defaultAliasIsQuoted.ts] ////

//// [es3defaultAliasQuoted_file0.ts]
export class Foo {
    static CONSTANT = "Foo";
}

export default function assert(value: boolean) {
    if (!value) throw new Error("Assertion failed!");
}

//// [es3defaultAliasQuoted_file1.ts]
import {Foo, default as assert} from "./es3defaultAliasQuoted_file0";
assert(Foo.CONSTANT === "Foo");

//// [es3defaultAliasQuoted_file0.js]
"use strict";
exports.__esModule = true;
var Foo = /** @class */ (function () {
    function Foo() {
    }
    Foo.CONSTANT = "Foo";
    return Foo;
}());
exports.Foo = Foo;
function assert(value) {
    if (!value)
        throw new Error("Assertion failed!");
}
exports["default"] = assert;
//// [es3defaultAliasQuoted_file1.js]
"use strict";
exports.__esModule = true;
var es3defaultAliasQuoted_file0_1 = require("./es3defaultAliasQuoted_file0");
es3defaultAliasQuoted_file0_1["default"](es3defaultAliasQuoted_file0_1.Foo.CONSTANT === "Foo");