mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
422 B
TypeScript
18 lines
422 B
TypeScript
//// [tests/cases/conformance/es2019/globalThisReadonlyProperties.ts] ////
|
|
|
|
//// [globalThisReadonlyProperties.ts]
|
|
globalThis.globalThis = 1 as any // should error
|
|
var x = 1
|
|
const y = 2
|
|
globalThis.x = 3
|
|
globalThis.y = 4 // should error
|
|
|
|
|
|
//// [globalThisReadonlyProperties.js]
|
|
"use strict";
|
|
globalThis.globalThis = 1; // should error
|
|
var x = 1;
|
|
const y = 2;
|
|
globalThis.x = 3;
|
|
globalThis.y = 4; // should error
|