mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
36 lines
484 B
TypeScript
36 lines
484 B
TypeScript
// @out: output.js
|
|
// @target: esnext
|
|
// @lib: esnext, dom
|
|
// @Filename: b.js
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
var a = 10;
|
|
this.a;
|
|
this.b;
|
|
globalThis.a;
|
|
globalThis.b;
|
|
|
|
// DOM access is not supported until the index signature is handled more strictly
|
|
self.a;
|
|
self.b;
|
|
window.a;
|
|
window.b;
|
|
top.a;
|
|
top.b;
|
|
|
|
// @Filename: actual.ts
|
|
var b = 10;
|
|
this.a;
|
|
this.b;
|
|
globalThis.a;
|
|
globalThis.b;
|
|
|
|
// same here -- no DOM access to globalThis yet
|
|
self.a;
|
|
self.b;
|
|
window.a;
|
|
window.b;
|
|
top.a;
|
|
top.b;
|
|
|