type-fest
type-fest copied to clipboard
A collection of essential TypeScript types
It would be nice if type-fest could support variables in paths passed to Get. Example: ```ts const obj = { array: [{ a: 1 }, { a: 2 }] }...
Is there was a way to type an object to require that it has exactly one key? The key itself can be any `string` (or `number` or `symbol` for that...
A common use case of making a `Partial` of an object, but leaving a few keys as is. ```typescript export type OptionalExcept = Pick & Partial; ``` Example: ```typescript interface...
This PR makes `Simplify` type works for computed types with deep nesting. Example: ```typescript type Foo = { foo: string; bar: number; baz: boolean; } type Result = { [K...
I forked this repo "https://github.com/bottenderjs/messaging-apis" because I need to change some of functionality and overall update of packages. Fork is here: https://github.com/sunray-eu/messaging-apis-custom/blob/9cc3f6a846203ffe6833e7aac0f987e3f84a913d/packages/messaging-api-common/src/case.ts#L210 -> In this package and file, there is...
Currently `Merge` is limited to only 2 arguments `Merge`. In cases where you want to merge more things, you have to nest it, like so: ```ts type MyComplexType = Merge<...
The `IntRange` type was added in [this PR](https://github.com/sindresorhus/type-fest/pull/707). As mentioned in the documentation `The numbers are created from the given `Start` (inclusive) parameter to the given `End` (exclusive) parameter.`. Could...
Similar to https://github.com/sindresorhus/type-fest/issues/758 // @Emiyaaaaa ## Upvote & Fund - We're using [Polar.sh](https://polar.sh/sindresorhus) so you can upvote and help fund this issue. - The funding will be given to active...
Hello there! Could anyone please advise if I can combine existing methods to achieve the following: `type Example = { a: string; b?: number; c: { ca: number; cb?: string;...
I've been trying to fiddle around with existing types, but I can't seem to figure this out. Say I have an object like: ```ts const object = { foo: 1,...