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

For example, this would be useful for a `FontStyle` type where the possible values are the space separated string of the terms `bold`, `italic`, `underline`, and `strikethrough`. Here a [possibility](https://stackoverflow.com/questions/59471947),...

For a union of only 2 elements, this would just be: ```ts type NonDiscriminatedUnion = Union | UnionToIntersection ``` However, the type would be more complex for the case of...

An optional type is really missing in the context of return types, When a function might a value or not you find yourself piping undefined ```ts type Maybe = T...

enhancement
help wanted

See https://github.com/sindresorhus/ts-extras/issues/39 and https://github.com/microsoft/TypeScript/issues/47660. ```ts const tuple = ['abc', 123, true] as const; type First = ArrayAt; // 'abc' type Last = ArrayAt; // true type SecondToLast = ArrayAt; //...

help wanted
type addition

```ts const delimiterFromScreamingSnake: DelimiterCase = 'foo#bar'; // => Type '"foo#bar"' is not assignable to type '"f#o#o##b#a#r"' expectType(delimiterFromScreamingSnake); ``` Could we improve it?

enhancement
help wanted

When using `Merge` with an indexed type on either left or right hand all the well-known properties are lost. This is because `keyof` of an indexed type always returns 'string...

bug
help wanted

#269 brought to my attention that #65 changed the `JsonObject` so that all keys are marked as optional. Before TypeScript 4.4 a `{ foo?: string}` and a `{ foo?: string|undefined...

enhancement
help wanted

```ts // by @金鑫 type Ensure = X extends Y ? X : never; type SafeKey = T extends string | number ? `${T}` : never; type SafeValue = K...

enhancement
help wanted

I'm currently using `CamelCasedPropertiesDeep` type and I found that it's not copy Date type, instead it creates copy of it. I've got this error ``` Argument of type '{ toString:...

help wanted

I'm not entirely sure if this is possible, or if there's a good way to do it. I've tried, and a few other iterations ```ts ReturnType ``` but `createStubInstance` infers...