clutz icon indicating copy to clipboard operation
clutz copied to clipboard

Event vs KeyboardEvent

Open LucasSloan opened this issue 6 years ago • 0 comments

I saw 2 instances of this error, there might be more. Basically, the Closure type system has much broader base types than the TypeScript type system. So in Closure, the type Event had all the properties of the TypeScript type KeyboardEvent. Gents translated the type to just Event, so it had to be manually changed to the more precise KeyboardEvent. There was a similar issue with Element and HTMLElement.

I think the fix is to introduce ClosureEvent and ClosureElement types that match the actual types of the Closure Event and Element (and probably more built-ins).

LucasSloan avatar May 28 '19 21:05 LucasSloan