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

### Overview Similar in syntax to the `SetOptional` and `SetRequired` types, `SetNonNullable` creates a type that makes the given keys non-nullable. ### Example ```ts type Foo = { a: number;...

### Issues Addressed #430 ### Changelog - ADDED the `SetNonNullable` type. ### Testing The unit test should suffice. ### Notes The structure of the implementation and test files were largely...

The change for #263 in release [v2.3.2](https://github.com/sindresorhus/type-fest/releases/tag/v2.3.2) no longer prevents the use of the keys in the Except. The following code no longer gives an error: ```Typescript import { Except...

bug
help wanted

Related discussion: https://github.com/remix-run/remix/pull/3276#discussion_r923949087 Summary: Currently we remove object entries that have unserializable values. This mimics `JSON.stringify` behavior for simple types, but when object value is a sum type we end...

Apparently TypeScript’s playground allows importing from npm: URL: https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBDAnmApnA3gUQB4GMVgwC+cAZlBCHAORKoC0pKAzjNQNwCwAUD3WgDEIEOAF4MPAJABXAHbBc0WQC44rKMFkBzLt0lQAhpoBGEAO6rTEADYoDs3UV19kg4QHVgMABYRpMACUjWVMzMTgcfEIAHiEIABoaQxNzagA+XQB6TNE0jDkFJVV1TS0iIA I think this URL should be included in the readme and other places.

This is a very basic type but is useful. I don't see it being easily available. ```ts type ArrayValue = Array extends (infer Value)[] ? Value : never ``` ```ts...

help wanted
type addition

I'm hitting a problem where `(string | undefined)[]` is incompatible with `JsonValue`. ```ts export type BrokenWrapper = {}; export type MyType = string[]; export type BrokenWrappedType = BrokenWrapper; ``` https://codesandbox.io/s/nice-water-lp2n5...

I was looking for a way to implement “any string that doesn’t start with a slash” with template literals, then I realized that it can be achieved with a generic...

https://stackoverflow.com/a/60112239/288906 ```ts type EmptyObject = Record; const one: EmptyObject = {}; // yes ok const two: EmptyObject = {a: 1}; // error ```

enhancement
type addition

Hello! Today I found myself in a situation where I had to remove the numbers at the end of each string of one union type. This is because I have...