TypeScript/tests/baselines/reference/es3defaultAliasIsQuoted.types
2015-09-16 15:47:52 -07:00

37 lines
923 B
Text

=== tests/cases/compiler/es3defaultAliasQuoted_file0.ts ===
export class Foo {
>Foo : Foo
static CONSTANT = "Foo";
>CONSTANT : string
>"Foo" : string
}
export default function assert(value: boolean) {
>assert : (value: boolean) => void
>value : boolean
if (!value) throw new Error("Assertion failed!");
>!value : boolean
>value : boolean
>new Error("Assertion failed!") : Error
>Error : ErrorConstructor
>"Assertion failed!" : string
}
=== tests/cases/compiler/es3defaultAliasQuoted_file1.ts ===
import {Foo, default as assert} from "./es3defaultAliasQuoted_file0";
>Foo : typeof Foo
>default : (value: boolean) => void
>assert : (value: boolean) => void
assert(Foo.CONSTANT === "Foo");
>assert(Foo.CONSTANT === "Foo") : void
>assert : (value: boolean) => void
>Foo.CONSTANT === "Foo" : boolean
>Foo.CONSTANT : string
>Foo : typeof Foo
>CONSTANT : string
>"Foo" : string