-
Notifications
You must be signed in to change notification settings - Fork 118
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
Suggestion: A bunch of new utilities #138
Comments
Hey @eyedean, It's great to have you here! These types look amazing but I am worried a little bit that we can overwhelm our readme (and our users) if we add all of them. I feel we need better structure for readme soon (folded regions or something). What if, for starters, we grab just the most useful types from what you presented? Some comments: Functions
I need more time and will power to dive into the other but some like |
I'm glad that you found it helpful, Kris. I definitely agree that Readme needs an overhaul. However, it doesn't need to be anything complicated -- just a grouping (like http://node.cool/) would suffice for now, I guess. We can probably do the same for the code structure. I took a look at https://github.com/krzkaczor/ts-essentials/blob/master/lib/types.ts and almost 80% of it simply covers Let me know if I could assist in that, or if you want me to issue my PR after you are done with the Readme/code overhaul. Thanks! PS. I agree that some of the cases in my utility types are very specific to my project! I'll leave them out or provide useful examples for them. PPS. my replies:
Agreed. In my case, I have a layer of abstraction that I need to convert Also, I think just having as much of usable stuff as we can provide wouldn't hurt as long as they are organized. In this case, If we have a group of Function and then a subgroup of Function Arguments under that, I would guess these would fit perfectly there.
Sure. I am open to a better/shorter naming.
Yup. I am heavily using Enums in my codebases and this is why it was handy for me. The fact that in TypeScript, objects of I removed that from the suggested utilities in my first post anyway. |
I see some of these are useful, but also we could add them in smaller PRs of fewer closely-related types, so it's easier to discuss. For some types I don't see a real usecase right away, it may be easier with a provided simple example and by using named generic args instead of just Some initial thoughts: Functions
Union
Mappings
Constructors
|
Some higher level thoughts: @krzkaczor we need to clarify the scope of our lib :) this is named "essentials" after all, so we probably don't want to include too many domain-specific types, like specific higher-order type transformations for functional programming -- I bet there are already specific libraries for that, right? (though we can include the "essential" ones, like Head & Tail are the building blocks of numerous functional utils) |
ad. |
That was clever! It's one of the biggest benefits of the open-source community -- you'll never stop learning. :)
I can look at the scope of this lib from 4 different perspectives.
|
cc @krzkaczor
I've updated documentation structure in #347 So now we can pick something to implement from here if it's not done yet, let me reread it and I will come back with the plan to resolve this issue |
Hi,
I am so excited that I found this repo! I have been doing similar things in a local file in my project and now I can replace it with an open-source, community managed dependency!
I have the following list that I can open a PR to add. I will definitely add examples and a better description before I do so. Before doing so, I wanted to run it by you guys (especially @krzkaczor) and see if they all seem fine or I should leave any of them behind.
Here is the list with appropriate credits: (If there is no Stackoverflow link associate with something, I have written that myself.)
Functions
Replace Types
Comparison/Union
Mappings
Constructors
PS. If you think I should open separate issues for each (or each specific group), please let me know. Thanks!
The text was updated successfully, but these errors were encountered: