File: globalThisPropertyAssignment.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (19 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (4)
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))