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 version is probably a year out. Just opening this issue to plan.* - [ ] Move to ESM. - [ ] Target the current TypeScript version minus 1. -...

Would it be useful to be able to convert a number in a string to a number literal type? `'100'` => `100`. I guess a more strictly typed `Number.parseInt` could...

Hey, It could be great to have a deep version of the utility type [StringKeyOf](https://github.com/sindresorhus/type-fest/blob/main/source/string-key-of.d.ts) that would extracts nested keys with dot-notation. Pretty useful when working with libraries using dot-notation...

There is a bug in Typescript related to ```keyof Array``` that affects ```ConditionalKeys``` and the Types using it. (reporting the bug itself to typescript, aswell) It can be fixed adHoc...

Like `Required` make all properties in T required. I want to propose adding `Must`, which makes all properties in T NonNullable. ```typescript type Must = { [P in keyof T]-?:...

Anyone know if its possible to get the Optional values of a type? ```ts interface A { a: string; b?: string; c?:string; d: string; } type B = OptionalsOf; ```...

[PR #34](https://github.com/sindresorhus/type-fest/pull/34#discussion_r325303311) defines ReadonlyDeep as follows. ```ts export type ReadonlyDeep = T extends Primitive | ((...arguments: any[]) => unknown) ? T : T extends ReadonlyMap ? ReadonlyMapDeep : T extends...

given ```ts export type OrderPart = SetRequired; export type OrderOnly = Opaque; export class OrderAggregateFactory { constructor(private readonly em: EntityManager) {} order(part: OrderOnly): Promise { ``` if I use it...

## Motivation/Use-cases If you want to model an object that can accept anything as value, you're tempted to use one of the following approach: ```ts const myObject: { [props: string]:...

```ts import {JsonValue} from "type-fest"; declare function identity(value: JsonValue): JsonValue; interface InterfaceObject { origin: string; } const objectViaInterface: InterfaceObject = { origin: 'red' }; identity(objectViaInterface); // Argument of type 'InterfaceObject'...