2014-08-15 23:33:16 +02:00
|
|
|
=== 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
|
2014-08-19 04:56:03 +02:00
|
|
|
>Keyboard : typeof Keyboard
|
2014-08-15 23:33:16 +02:00
|
|
|
>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
|
|
|
|
}
|