Generated variants could use TypeScript name
grabbou opened this issue · 0 comments
grabbou commented
For the following:
type AnyEvent = OpenEvent | ErrorEvent | CloseEvent | MessageEvent
(event: AnyEvent) => void
the generated variant on the native side is rather long:
Variant_OpenEvent_ErrorEvent_CloseEvent_MessageEvent
it would be cool if Nitrogen aliased that or used the actual name that is in TypeScript, that is AnyEvent
, and only fallback to autogenerated name when union is provided inline.
Not a big deal, I am currently type aliasing this myself, but just a little improvement to consider.