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

[TypeScript `4.5.0-beta` contains a built-in `Awaited` type](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#the-awaited-type-and-promise-improvements) which has the same functionality as the `PromiseValue` type in type-fest. It should be swapped out when TypeScript 4.5 has a stable release.

similar to PartialDeep but the inverse, where all KV pairs are required.

help wanted
type addition

I have a type with PascalCase and a few uppercase properties, e.g. ``` Identifiers: { MarketplaceASIN: { MarketplaceId: string; ASIN: string; }, } ``` SnakeCasedPropertiesDeep turns this into: ``` _identifiers:...

bug
help wanted

## Description The following fails type checking. ```ts import {PackageJson, JsonObject} from 'type-fest'; import {expectType} from 'tsd'; const packageJson: PackageJson = {}; const createPackageJson = () => packageJson; expectType(createPackageJson()); //...

bug
help wanted

Right now, `CamelCase` (and, obviously, `CamelCasedProperties` and `CamelCasedPropertiesDeep`) behaves weirdly when handling two character strings. When it's a 2 character string (like `ID`, for example), it will transform the string...

bug
help wanted

I think https://github.com/sindresorhus/type-fest/pull/157/files#diff-520a63fe400b4b92fa3ccc14cabc1d84153987354c3f242deddfaeff0a7deae2 could be useful for others too. - [ ] Should it also support array like in https://gist.github.com/ClickerMonkey/a081b990b9b14215141fb6248cef4dc4#file-types-ts-L49-L54 ? - [ ] Any other of our types that...

``` import {ConditionalKeys} from 'type-fest'; interface Example { a: string; b: string | number; c?: string; d: {}; } type StringKeysOnly = ConditionalKeys; ``` ## Expect to be `'a'` but...

The Playground now supports [automatic type acquisition](https://www.typescriptlang.org/play/index.html?e=183#example/automatic-type-acquisition) - so you can showcase your API in a way that people can experiment in, for example here's the [README example](https://www.typescriptlang.org/play/index.html#code/JYWwDg9gTgLgBAbwKIA8DGBTMMC+cBmUEIcA5DAJ5gYC0+GAzjKQNwCwAUJ5dXAGIQIcALyJOASACuAO2Bpo0gFxwmUYNIDm7DuKgBDdQCMIAd2XGIAGwx7p2nNu5UM-QQHVgMABYRJMAEoG0sYmInComNgAPAIQADRk+kampAB82gD0GcKpiDJyCsqq6ho4QA)

enhancement
help wanted

Inspired by - https://stackoverflow.com/a/53955431/5039290 ```ts type IsUnion = [T] extends [UnionToIntersection] ? false : true; ``` **Use case** Create a specific type that guarantees only unions from a generic type...

enhancement
type addition