type-plus
ts-essentials
type-plus | ts-essentials | |
---|---|---|
1 | 4 | |
353 | 3,577 | |
- | 1.1% | |
9.6 | 6.9 | |
4 days ago | 15 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
type-plus
-
Trying to Understand Copilot's Type Spaghetti
That’s just how type programming looks.
Here’s (https://github.com/unional/type-plus/blob/main/packages/type...) a human written example that’s well-factored and uses loads of subtypes to clarify what it’s doing - but it’s still going to read like the black tongue of Mordor to you if you’re not familiar with how this kind of type stuff is structured and used.
And factoring all that stuff out may help readability but it doesn’t help comprehension - try and trace what the actual underlying type definitions for some of those utility types like IdentityEqual<> are actually doing (look at https://github.com/unional/type-plus/blob/main/packages/type...) and realize the rabbit hole runs deep in this stuff.
ts-essentials
-
Essential Code Organization Principles
Also, it’s not as restrictive as mutability tools — if you know what you are doing and want to ignore this limitation for a particular case, you can apply the -readonly modifier or the Writeable type from type-fest or ts-essentials.
- libraries you are happy that you discovered them
-
ts-essentials VS utility-types - a user suggested alternative
2 projects | 24 Nov 2022
-
Explicit empty list type
True a readonly array would help, or even better yet deep readonly (which comes with ts-essentials) when dealing with non-primitive arrays
What are some alternatives?
ts-toolbelt - đź‘· TypeScript's largest type utility library
type-fest - A collection of essential TypeScript types
Superstruct - A simple and composable way to validate data in JavaScript (and TypeScript).
DefinitelyTyped - The repository for high quality TypeScript type definitions. [Moved to: https://github.com/DefinitelyTyped/DefinitelyTyped]
talk-typelevel-ts - Code samples for my talk “Type-level programming in TypeScript”
robot - 🤖 A functional, immutable Finite State Machine library
brainfuck-ts-types - A brainfuck interpreter running within the typescript type system
utility-types - Collection of utility types, complementing TypeScript built-in mapped types and aliases (think "lodash" for static types).
runtypes - Runtime validation for static types
DefinitelyTyped - The repository for high quality TypeScript type definitions.
fp-ts - Functional programming in TypeScript
ts-belt - 🔧 Fast, modern, and practical utility library for FP in TypeScript.