How to widen a narrow library type from userland

Sometimes you want to allow user-defined types to be merged with a narrow library defined type.

So the library provides a NARROW type. And you want a WIDENING of the type by defining those locally

https://stackoverflow.com/a/56516998 https://www.typescriptlang.org/docs/handbook/declaration-merging.html

https://stackoverflow.com/questions/51173191/typescript-require-generic-parameter-to-be-provided

Read this on generics

https://www.scaler.com/topics/typescript/generic-vs-union-types/