TypeScript/tests/baselines/reference/localImportNameVsGlobalName.types

47 lines
796 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/localImportNameVsGlobalName.ts ===
module Keyboard {
>Keyboard : typeof Keyboard
2014-08-15 23:33:16 +02:00
export enum Key { UP, DOWN, LEFT, RIGHT }
>Key : Key
>UP : Key
>DOWN : Key
>LEFT : Key
>RIGHT : Key
2014-08-15 23:33:16 +02:00
}
module App {
>App : typeof App
2014-08-15 23:33:16 +02:00
import Key = Keyboard.Key;
>Key : typeof Key
>Keyboard : typeof Keyboard
>Key : Key
2014-08-15 23:33:16 +02:00
export function foo(key: Key): void {}
>foo : (key: Key) => void
>key : Key
>Key : Key
2014-08-15 23:33:16 +02:00
foo(Key.UP);
>foo(Key.UP) : void
>foo : (key: Key) => void
>Key.UP : Key
>Key : typeof Key
>UP : Key
2014-08-15 23:33:16 +02:00
foo(Key.DOWN);
>foo(Key.DOWN) : void
>foo : (key: Key) => void
>Key.DOWN : Key
>Key : typeof Key
>DOWN : Key
2014-08-15 23:33:16 +02:00
foo(Key.LEFT);
>foo(Key.LEFT) : void
>foo : (key: Key) => void
>Key.LEFT : Key
>Key : typeof Key
>LEFT : Key
2014-08-15 23:33:16 +02:00
}