-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
「DISCUSS」TypeScript utility types #39881
Comments
I would install |
I'm ++ to options 1 and/or 3. I think there's certainly benefit to having these utility types centralized, but I don't know |
Yeah, I'm a fan of a shared set of utility types that might just re-export types from |
@spalger I added option |
++ this feels like the most flexible option, otherwise we might end up creating our own shared set of utility types later anyway if we need something that lib doesn't offer. |
👍 for 5 to have benefits of 1 & 3. |
(5) sounds great 💯 |
I vote 5️⃣ with a set of sensible defaults like |
Looks like there is a general consensus if favor of option 5. Can we move forward and resurrect (for a slightly different purpose) @kbn/types then? 🙂 |
@azasypkin I would call it
|
Sure.
It shouldn't matter which package we use under the hood, we can easily switch to another one in the future or write our own utility types from scratch and the name of our own package shouldn't depend on that. |
As we are now actively using TypeScript we accumulate various useful helper utilities, like
UnwrapPromise
. As I understand we have at least 3 "UnwrapPromise
" helpers in our codebase. What shall we do about TypeScript utilities?utility-types
.type-fest
./src/types
or/src/core
.UnwrapPromise
,Omit
,Brand
, etc.@kbn/types
(or@kbn/utility-types
) in/packages
folder.The text was updated successfully, but these errors were encountered: