TypeScript/tests/baselines/reference/localImportNameVsGlobalName.types
2015-04-15 16:44:20 -07:00

47 lines
796 B
Plaintext

=== tests/cases/compiler/localImportNameVsGlobalName.ts ===
module Keyboard {
>Keyboard : typeof Keyboard
export enum Key { UP, DOWN, LEFT, RIGHT }
>Key : Key
>UP : Key
>DOWN : Key
>LEFT : Key
>RIGHT : Key
}
module App {
>App : typeof App
import Key = Keyboard.Key;
>Key : typeof Key
>Keyboard : typeof Keyboard
>Key : Key
export function foo(key: Key): void {}
>foo : (key: Key) => void
>key : Key
>Key : Key
foo(Key.UP);
>foo(Key.UP) : void
>foo : (key: Key) => void
>Key.UP : Key
>Key : typeof Key
>UP : Key
foo(Key.DOWN);
>foo(Key.DOWN) : void
>foo : (key: Key) => void
>Key.DOWN : Key
>Key : typeof Key
>DOWN : Key
foo(Key.LEFT);
>foo(Key.LEFT) : void
>foo : (key: Key) => void
>Key.LEFT : Key
>Key : typeof Key
>LEFT : Key
}