Let's say I have a very long generic type name inside an included package called:
MySuperLongGenericTypeNameWithCarrots<SomeType, SomeType>
Now, I would like to create an alias to shorten the name, like:
MyShortname<SomeType, SomeType>
I've tried the following, but didn't manage to figure out how to do this:
type MyShortname<SomeType, SomeType> = MySuperLongGenericTypeNameWithCarrots<SomeType, SomeType>;
Any ideas would be appreciated!
Try this:
type MyShortname<SomeTypeA, SomeTypeB extends keyof SomeTypeA> = MySuperLongGenericTypeNameWithCarrots<SomeTypeA, SomeTypeB>;