mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
36 lines
2.2 KiB
Plaintext
36 lines
2.2 KiB
Plaintext
globalThisUnknownNoImplicitAny.ts(4,5): error TS2339: Property 'hi' does not exist on type 'Window & typeof globalThis'.
|
|
globalThisUnknownNoImplicitAny.ts(5,6): error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
globalThisUnknownNoImplicitAny.ts(6,12): error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
globalThisUnknownNoImplicitAny.ts(8,5): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
|
|
globalThisUnknownNoImplicitAny.ts(9,1): error TS7053: Element implicitly has an 'any' type because expression of type '"hi"' can't be used to index type 'typeof globalThis'.
|
|
Property 'hi' does not exist on type 'typeof globalThis'.
|
|
globalThisUnknownNoImplicitAny.ts(10,1): error TS7053: Element implicitly has an 'any' type because expression of type '"hi"' can't be used to index type 'typeof globalThis'.
|
|
Property 'hi' does not exist on type 'typeof globalThis'.
|
|
|
|
|
|
==== globalThisUnknownNoImplicitAny.ts (6 errors) ====
|
|
declare let win: Window & typeof globalThis;
|
|
|
|
// all accesses should be errors
|
|
win.hi
|
|
~~
|
|
!!! error TS2339: Property 'hi' does not exist on type 'Window & typeof globalThis'.
|
|
this.hi
|
|
~~
|
|
!!! error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
globalThis.hi
|
|
~~
|
|
!!! error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.
|
|
|
|
win['hi']
|
|
~~~~
|
|
!!! error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
|
|
this['hi']
|
|
~~~~~~~~~~
|
|
!!! error TS7053: Element implicitly has an 'any' type because expression of type '"hi"' can't be used to index type 'typeof globalThis'.
|
|
!!! error TS7053: Property 'hi' does not exist on type 'typeof globalThis'.
|
|
globalThis['hi']
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS7053: Element implicitly has an 'any' type because expression of type '"hi"' can't be used to index type 'typeof globalThis'.
|
|
!!! error TS7053: Property 'hi' does not exist on type 'typeof globalThis'.
|
|
|