TypeScript/tests/cases/compiler/es3defaultAliasIsQuoted.ts

15 lines
400 B
TypeScript
Raw Normal View History

2015-09-17 00:47:52 +02:00
// @module: commonjs
// @target: es3
// @Filename: es3defaultAliasQuoted_file0.ts
export class Foo {
static CONSTANT = "Foo";
}
export default function assert(value: boolean) {
if (!value) throw new Error("Assertion failed!");
}
// @Filename: es3defaultAliasQuoted_file1.ts
import {Foo, default as assert} from "./es3defaultAliasQuoted_file0";
assert(Foo.CONSTANT === "Foo");