Replies: 4 comments
-
Hey Sean, glad to see you again, happy new year! Are you having this issue when using generics? In this case, we can mitigate it like this: type _Example<O extends object> =
O.Filter<O.Select<O, string | number>, 1 | 2 | 3> extends infer X ? X : never This will cause ts not to expand the types too far. Then on my side I can work on improving this, so that you can get even shorter types. |
Beta Was this translation helpful? Give feedback.
-
@ctrlplusb did this help you? Can I close this issue? |
Beta Was this translation helpful? Give feedback.
-
Sorry, been distracted. Will give this a thorough test soon. We can close it in the interim if you like. I'll report back if it doesn't work as expected. 👍 |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
-
Hi @pirix-gh
Hope you are doing well. Good to see that
ts-toolbelt
is continuing to grow. 💜A quick question for yourself...
Is there any mechanism by which I could improve the legibility of the types generated when using the
ts-toolbelt
types.For example, when using combinations of
Pick
,Filter
,Select
on an object type the generated type becomes realllllly long.Could I compact this out in some manner to improve the legibility?
Beta Was this translation helpful? Give feedback.
All reactions