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

Added new type IfEqual type guard, to improve on the issue raised #788

I'd like `NonNullable` but for deep structures. This is mentioned in #117 but it isn't clear that's the solution the issue creator is looking for so I'm creating a separate...

fix #756 - Do not treat unknown like undefined (the condition was `undefined extends T[KeyType]` that is true when `T[KeyType]` is `unknown`) - The bug reported in #756 was due...

Using `ConditionalKeys` with a condition type of `Date` fails to match an object property with type `Date | undefined`. The danger with this is that the type has to be...

Enforcing casing, such as: ```ts type MyObj = { name: IsKebabCase } ``` When I go to create an object of type `MyObj` the `name` property will error if not...

Trying to update type-fest to 3.5.4 yields the following breakage: ![image](https://user-images.githubusercontent.com/3950300/216449839-fe5dcd48-ef91-4370-adcc-a2da8ca7e806.png) ![image](https://user-images.githubusercontent.com/3950300/216450293-9a6c5b44-047f-42ae-b138-c66e1770f0a3.png) An `Array.isArray(JsonValue)` guard removes `JsonValue[]` but not `readonly JsonValue[]` from the type. Is there a non-hacky solution (i.e....

Closes #641 The implementation includes a generic, perhaps more useful type `DeepReplace` that I could separate into its own module in a separate PR if you want. Also note that...

array slice & string slice [Issue](https://github.com/sindresorhus/type-fest/issues/734)

Hi. I'm facing a problem where `Get` does not get expected type of a property but `unknown`. Please consider the following example code: ```typescript type Student = { ID: number;...

When a string has a `WordSeparators` character (e.g. `'-'`, `'_'` or `' '`) followed by an uppercase character, the resulting `KebabCase` & `SnakeCase` (and probably all `DelimiterCase`) type adds additional/duplicate...