mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
1005 B
Plaintext
19 lines
1005 B
Plaintext
globalThisPropertyAssignment.js(1,6): error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
globalThisPropertyAssignment.js(4,8): error TS2339: Property 'z' does not exist on type 'Window & typeof globalThis'.
|
|
globalThisPropertyAssignment.js(6,12): error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
|
|
|
|
==== globalThisPropertyAssignment.js (3 errors) ====
|
|
this.x = 1
|
|
~
|
|
!!! error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
var y = 2
|
|
// should work in JS
|
|
window.z = 3
|
|
~
|
|
!!! error TS2339: Property 'z' does not exist on type 'Window & typeof globalThis'.
|
|
// should work in JS (even though it's a secondary declaration)
|
|
globalThis.alpha = 4
|
|
~~~~~
|
|
!!! error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
|