Keep type name when using generic
I'm using a custom set of branding utilities (from ts-brand iirc).
Since I'm not using arktype's branding, I've made this (maybe not so great) function:
This works well enough so its not my main question, though if theres a better way lmk.
I'm now wanting to pass a given brand to another type generically:
This works, but now the output type is inferred like:
Which isn't ideal since I'm exporting from a package this and want it to instead be:
2 Replies
I tried this example:
to no avail either, the inferred type of
value
becomes never
.
finally:
Glad it's working for you! Can definitely be tricky to get those parameters inferred and passed along the way you want in TS