-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
typescriptTypescript enhancements and bugsTypescript enhancements and bugs
Description
Originally posted by @ShimiSun in #6983 (comment)
Our team is experiencing a backward compatibility issue due to this fix. This PR is limiting the range of mouse event type and we are seeing the following type error:
Type '((event: MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined' is not assignable to type
'((event: MouseEvent<Element, MouseEvent>) => void) | undefined'.
Hence, until now, grommet accepted HTMLDivElement
, but now it only allows Element
. I suspect this may not be backward compatible. https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement
Here are a couple (out of 8) of workarounds we had to apply in order to get the new typing to work
Unfortunately, this is reducing our type-specific and making our code less safe.
Metadata
Metadata
Assignees
Labels
typescriptTypescript enhancements and bugsTypescript enhancements and bugs