type-fest icon indicating copy to clipboard operation
type-fest copied to clipboard

A collection of essential TypeScript types

Results 242 type-fest issues
Sort by recently updated
recently updated
newest added

This is more of a question for advanced type experts. Would it be possible to make a type that only allows positive integers in a string? E.g. `"123"` and `"82739283293237"`...

since typescript omit is something like this ```ts type Omit = Pick; ``` could we change the constraint `extends KeysOfUnion` in `DistributedOmit` as same ? ## Upvote & Fund -...

Example situation: ```typescript type F = { (thing: string): void; (things: string[]): void; } type Z = Parameters[0] ``` Type Z here resolves to `string[]`, not `string | string[]`, because...

Look at this scene I have a type `Item` that wrapped with some util type, and I want get a simplify `Item`, like: ```ts import type { SimplifyDeep } from...

enhancement
help wanted

Would be great if you could specify which types you want in Paths. For example if you have this type: ``` type Translations = { project: string; user: { name:...

component:paths

```ts Paths; ``` will result in simply `'a.b'` as `Paths` has no way to escape the `.` in the `a.b` property, which also means that `PickDeep` etc that are based...

bug
component:paths

Its a bit odd that we have [`Get`](https://github.com/sindresorhus/type-fest/blob/main/source/get.d.ts) which accepts three styles of specifying paths, but doesn't use [`Paths`](https://github.com/sindresorhus/type-fest/blob/main/source/paths.d.ts), and also have [`PickDeep`](https://github.com/sindresorhus/type-fest/blob/main/source/pick-deep.d.ts) etc which use `Paths` and only accepts...

component:paths

The following code is considered as valid by Typescript, although I was expecting it to complain that the filter `foo` in `commonArguments` was empty. ```ts import type { NonEmptyObject }...

bug
help wanted
good first issue

Would it make sense to create a type for [serializable objects](https://developer.mozilla.org/en-US/docs/Glossary/Serializable_object)? Similar to Jsonify et al., this would match values that could losslessly be deep-copied via `structuredClone` or `postMessage`. ##...

Quick update to the README for the question posted at https://github.com/sindresorhus/type-fest/issues/136 since I am least the second to newb to ask.