Type-fest Alternatives
Similar projects and alternatives to type-fest
-
TypeScript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
-
Appwrite
Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
-
-
-
-
-
-
Scout APM
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
-
-
utilities
Repository of utilities for deno written in typescript for trailmix🌤🦕🍣😼 (by trailmix)
-
-
-
type-challenges
Collection of TypeScript type challenges with online judge
-
bulletproof-react
🛡️ ⚛️ A simple, scalable, and powerful architecture for building production ready React applications.
-
tslint
:vertical_traffic_light: An extensible linter for the TypeScript language
-
pothos
Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
-
-
typescript-runtime-type-benchmarks
📊 Benchmark Comparison of Packages with Runtime Validation and TypeScript Support
-
-
TSpell
Abusing the TypeScript type checker as a spell checker because I just can't help myself.
-
graphql-utils
Utilities and helpers to make working with GraphQL.js based APIs simpler.
type-fest reviews and mentions
-
How can I keep an optional property in a merged type where there is an overlap?
You should look at using the following utility types from type-fest
-
Test your TypeScript type with Vitest
In this case how do I test a type utility library like type-fest? This plugin is not intended to test JavaScript code but TypeScript types!
-
Any Typescript masters here?
You may want also to look at the lib typefest. It provides types which probably should have been built-in: it s full of awesome patterns.
-
Unlocking type-safety superpowers in Typescript with nominal and refinement types
Relatively the same approach as type-fest's opaque type
-
Extreme Explorations of TypeScript's Type System
> TypeScript's type annotations are really a DSL embedded into JavaScript. And they can, and, depending on the problem at hand, should be treated as such.
I think this is the key. If treated as you describe, meaning the advanced types are well-written, well-documented, and well unit-tested as if they are "true" code, then using them shouldn't be too much of an issue.
However, I think people often just assume that the types aren't "real" code and thus the normal concepts of good software engineering don't apply and type monstrosities which nobody can understand result.
Imagine if this code[0] wasn't well documented, fairly clearly written, and also tested. It would definitely be a liability in a codebase.
In addition, the rules of how advanced TypeScript concepts work can be quite nuanced and not always extremely well defined, so you can end up in situations where nobody even _really_ understands why some crazy type works.
[0]: https://github.com/sindresorhus/type-fest/blob/2f418dbbb6182...
-
Use opaque types to improve typing on basic types
And get the Opaque type from type-fest: https://github.com/sindresorhus/type-fest/blob/main/source/opaque.d.ts
-
Is there any collection of general-purpose premade types?
https://github.com/sindresorhus/type-fest is one of the better ones.
-
pkgroll: zero-config JS bundler for ESM, CommonJS, and .d.ts outputs
For example, if you use type-fest—a package of type utilities—it must be in your dependencies because the consumer needs to resolve those type imports. However, with pkgroll, it can be in devDependencies because it bundles in only the types it imports.
- Need help generating an intersection type with conditional types
-
Wrap each intersection member into container type
``` // from: https://github.com/sindresorhus/type-fest/blob/v2.12.1/source/union-to-intersection.d.ts type UnionToIntersection = ( Union extends unknown ? (distributedUnion: Union) => void : never ) extends ((mergedIntersection: infer Intersection) => void) ? Intersection : never;
-
How to Troubleshoot Types?
To formalize it, you can write type tests (yes, types can be tested! A failing test is a compiler error. You can also test the negative case, using // @ts-expect-error ). If you want to see how types are tested, check out some open source projects like type-fest.
-
Are readonly interfaces possible?
Or ReadOnlyDeep from type-fest.
- Cheat Sheets for Web Developers
- Is there a way to guarantee that a number variable can never be a non-finite value?
- Types for 'at least 1' without having to define the powerset of every possible property?
Stats
sindresorhus/type-fest is an open source project licensed under Creative Commons Zero v1.0 Universal which is not an OSI approved license.
Popular Comparisons
Are you hiring? Post a new remote job listing for free.