We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Given foosert.ts:
foosert.ts
export class Foo { static CONSTANT = "Foo"; } export default function assert(value: boolean) { if (!value) throw new Error("Assertion failed!"); }
and entrypoint.ts:
entrypoint.ts
import {Foo, default as assert} from "./foosert"; assert(Foo.CONSTANT === "Foo");
When running tsc -m 'commonjs' entrypoint.ts, entrypoint.ts gets compiled to:
tsc -m 'commonjs' entrypoint.ts
var foosert_1 = require("./foosert"); foosert_1.default(foosert_1.Foo.CONSTANT === "Foo");
but should be:
var foosert_1 = require("./foosert"); foosert_1["default"](foosert_1.Foo.CONSTANT === "Foo");
Given
foosert.ts:and
entrypoint.ts:When running
tsc -m 'commonjs' entrypoint.ts,entrypoint.tsgets compiled to:but should be: