1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
=== tests/cases/conformance/es2019/globalThisPropertyAssignment.js ===
this.x = 1
>this.x : Symbol(x, Decl(globalThisPropertyAssignment.js, 0, 0))
>this : Symbol(globalThis, Decl(globalThisPropertyAssignment.js, 3, 12))
>x : Symbol(x, Decl(globalThisPropertyAssignment.js, 0, 0))
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, --, --), Decl(globalThisPropertyAssignment.js, 1, 9))
// should work in JS (even though it's a secondary declaration)
globalThis.alpha = 4
>globalThis.alpha : Symbol(alpha, Decl(globalThisPropertyAssignment.js, 3, 12))
>globalThis : Symbol(globalThis, Decl(globalThisPropertyAssignment.js, 3, 12))
>alpha : Symbol(alpha, Decl(globalThisPropertyAssignment.js, 3, 12))
|