mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
450 B
Plaintext
18 lines
450 B
Plaintext
//// [tests/cases/conformance/es2019/globalThisPropertyAssignment.ts] ////
|
|
|
|
=== globalThisPropertyAssignment.js ===
|
|
this.x = 1
|
|
>this : Symbol(globalThis)
|
|
|
|
var y = 2
|
|
>y : Symbol(y, Decl(globalThisPropertyAssignment.js, 1, 3))
|
|
|
|
// should work in JS
|
|
window.z = 3
|
|
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
|
|
|
|
// should work in JS (even though it's a secondary declaration)
|
|
globalThis.alpha = 4
|
|
>globalThis : Symbol(globalThis)
|
|
|