mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
//// [tests/cases/compiler/extendGlobalThis.ts] ////
|
|
|
|
=== 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 {}
|
|
|
|
=== 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, --, --), Decl(lib.es2015.symbol.wellknown.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, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
|
|