forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
extendGlobalThis.symbols
30 lines (23 loc) · 1002 Bytes
/
extendGlobalThis.symbols
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
=== tests/cases/compiler/extension.d.ts ===
declare global {
>global : Symbol(global, Decl(extension.d.ts, 0, 0))
namespace globalThis {
>globalThis : Symbol(globalThis, Decl(extension.d.ts, 0, 16))
var test: string;
>test : Symbol(test, Decl(extension.d.ts, 2, 11))
}
}
export {}
=== tests/cases/compiler/index.ts ===
import "./extention";
globalThis.tests = "a-b";
>globalThis : Symbol(globalThis, Decl(extension.d.ts, 0, 16))
console.log(globalThis.test.split("-"));
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>globalThis.test.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --))
>globalThis.test : Symbol(test, Decl(extension.d.ts, 2, 11))
>globalThis : Symbol(globalThis, Decl(extension.d.ts, 0, 16))
>test : Symbol(test, Decl(extension.d.ts, 2, 11))
>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --))