type-fest
type-fest copied to clipboard
A collection of essential TypeScript types
Fixes #273
I have been looking for a strict version of `Extract`. For simplicity, let's call it `ExtractStrict`. `ExtractStrict` would have one additional feature compared to `Extract`: `ExtractStrict` would throw an error...
Note to self on what to do for v3: - Remove deprecated stuff: https://github.com/sindresorhus/type-fest/search?q=deprecated - Target Typescript 4.7 - Make the `strict` option in `Get` true by default - Make...
Merge two types recursively into a new type. Properties set to `undefined` value are skipped when `strict` option is set to `true` (default). Array and plain object properties are merged...
Fixes #419
### Proposal A type `PropagateNever` would allow for better API typing to indicate error conditions. Namely, in the case where there is deeply nested `never` in an object, the type...
I was playing with @zorji 's `Exact` type and found that it errors for intersection types, but specifically when you construct the intersection type like `Array & Array` I can...
I'm opening this issue for documentation/googlability, but it should also probably be added to https://github.com/sindresorhus/type-fest/blob/main/source/require-at-least-one.d.ts It turns out, `RequireAtLeastOne` also works with arrays: ```ts type NonEmptyArray = RequireAtLeastOne; export const...
Please add `nodenext` and `node16` to the `TsConfigJson.Module` type definition as per https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#esm-nodejs ``` export type Module = ... | 'nodenext' | 'NodeNext' | 'node16' | 'Node16'; ```
Add `Set` type. Looks like `Get` Example: ```typescript type InitValue = {} type NewResult = Set result: { level1: { level2: { level3: number } } } ``` ## Upvote...