My win this week is more of a win/shoutout. Thank you open source and the people that work in it. I posted a question on Twitter about TypeScript and Daniel Rosenwasser from the TypeScript team chimed in. Problem solved. Much appreciated Daniel!
You can augment interfaces in modules in @typescriptlang via declaration merging, but can you do it for a `type`? e.g. type EventType = keyof GlobalEventHandlersEventMap augmented to type EventType = keyof GlobalEventHandlersEventMap | 'customEvent';
02:18 AM - 06 Apr 2019
From what I can tell, it's not possible. I can rework the types so that an interface can be overridden, but it'd be nice to do it directly for EventType. #TypeScript
02:27 AM - 06 Apr 2019
@nickytonline You can augment GlobalEventHandlerMap and add in an entry for customEvent.
04:07 AM - 06 Apr 2019
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.