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.
    