mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +03:00
11 lines
239 B
TypeScript
11 lines
239 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noEmit: true
|
|
// @Filename: globalThisPropertyAssignment.js
|
|
this.x = 1
|
|
var y = 2
|
|
// should work in JS
|
|
window.z = 3
|
|
// should work in JS (even though it's a secondary declaration)
|
|
globalThis.alpha = 4
|