You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.ts:1:7 - error TS2322: Type 'Window & typeof globalThis' is not assignable to type 'Window'.
Types of property 'ontouchcancel' are incompatible.
Type '(((this: GlobalEventHandlers, ev: TouchEvent) => any) & ((this: Window, ev: TouchEvent) => any)) | null | undefined' is not assignable to type '((this: GlobalEventHandlers, ev: TouchEvent) => any) | null'.
Type 'undefined' is not assignable to type '((this: GlobalEventHandlers, ev: TouchEvent) => any) | null'.
1 const w: Window = window;
~
π Expected behavior
Usually, T & U is assignable to T.
The text was updated successfully, but these errors were encountered:
I think fixing the new errors in https://github.com/mui-org/material-ui might be a useful exercise. It looks like there are going to be some issues for consumers of @types/react if we don't seed an update.
sandersn
changed the title
New error: Type 'Window & typeof globalThis' is not assignable to type 'Window'
strict-optional-properties error: Type 'Window & typeof globalThis' is not assignable to type 'Window'
Jun 16, 2021
Bug Report
π Search Terms
strictoptionalproperties, global
β― Playground Link
Playground link with relevant code (and enable
strictOptionalProperties
)π» Code
π Actual behavior
π Expected behavior
Usually,
T & U
is assignable toT
.The text was updated successfully, but these errors were encountered: