sindresorhus/
A collection of essential TypeScript types
USD raised
Recent activities
Add `Mutable` type
Proposal: DeepPartial
Add examples for the built-in types mentioned in the readme
[4.10.0][Regression] failure when type checking with exactOptionalPropertyTypes
Run `tsc` on all test files
IntRange Inclusive
Maintenance strategy: Considering splitting `type-fest` into smaller importable parts
OptionalExcept type
Why do we need to specify the `engines` field in package.json?
Require exactly one key of type `string`
Bug: Nextjs and type-fest camel-case.d.ts Type error: '?' expected.
CamelCasedObjectDeep breaks tuple-types into array-types
`UnionToUnorderedTuple` type
ReadonlyDeep: add test for function or method returning an object?
`RepeatString` type
`ArraySlice` should support spread array
TS 5.4.2 breaks `ConditionalKeys` and `SetParameterType`
`ReadonlyDeep` / `WritableDeep` not modifying arrays as of TS 5.3.3
"Writable" is imported from external module "./writable.js" but never used in
Feature Request (or bug report?) - Get the last key of a record
SetRequiredDeep - is it possible?
NonNullableDeep
`Get<BaseType, Path>` does not work when `Path` contains `${number}`
`PackageJson`: Why properties like `name` and `version` are not required?
IfType type guards
4.9.0 fails with "Cannot find module './camel-case' or its corresponding type declarations"
Canary: `MergeDeep` failures in `typescript@next` not detected by canary tests
ReadonlyDeep turns `void` into `unknown`
MergeDeep is never when compiled to .d.ts
`MergeDeep` removes optionals from `any` and `never` fields
`Addition` And `Subtraction` Type Proposal
ConditionalPickDeep does not work with deep interfaces
`Paths` should not recurse into `Map`'s prototype properties.
`ArraySlice` resolves to `never` when passing `number`
Paths<T> should handle recursive types
Add `SetReadonly`
4.23.0 introduced a breaking change in `Paths` type
Issues with `Paths` type
Expose Max Recursion Depth of Paths
Exact not function correctly with Dates since last commit
Add `IsNullable` and `IsOptional`
Web-specific version of `StructuredCloneable` type
`Exact` does not work as expected with type involving `Date` and union
Document `IntRange` `Start` param must be `>=0`
`IfxxxLiteral` (eg `IfBooleanLiteral`) are missing (only the `IsxxxLiteral` is present
`CamelCasedPropertiesDeep` doesn't handle `Tagged` type correctly
`IsStringLiteral` should be `false` for branded and tagged types
`SimplifyDeep` doesn't deep simplify lists
`schema` should properly set type of objects in arrays
Set up dependabot / renovate
ConditionalKeys does not correctly filter out `never` type
`And` and `Or` is not exported at `index.d.ts`
Zero is not exported by ...
ArrayExceptLastElement type
Type-fest based prelude
Unify `Get` and `Paths` / `PickDeep` etc
Exclude / Pick type in Paths / only add leaf nodes
Proposal: Promisable
OverrideProperties changes undefined as optional
Proposal: SetKeyRequired with key required, but allow undefined value
Type for serializable objects?
Use `NoInfer`?
Make the second argument to RequireAllOrNone optional
IfAny circular constraint in TS 5.4+
`MergeDeep` doesn't preserve `readonly` modifier
IsLiteral should not require the type to be Primitive but check it internally
Add `Expand` type
`RequiredDeep` silently erases types past a depth of 3 as a side-effect
SetParameterType for functions
Missing export after adding `Tagged` type
Proposal: `IndexesOf` and `ItemsOf`
Proposal: `Enumerate` and `IntRange`
SingleOrArray - Add type for a single value or an array of values
Support composable tagged types
Check if we need to reduce "excessively deep error" on WritableDeep too
Broken link on paka.dev in readme.md
Expose `NonEmptyTuple`
Expose `UnknownRecord` in the public API
Jsonify fails on nested object with name property.
`UndefinedOnPartialDeep` (opposite of `PartialOnUndefinedDeep`)
Is it possible to Omit native type like booleans or numbers?
`RequireOneOrNone` type
Fails compilation in swc's strict mode
`Opaque` does not work with case changes (ie. SnakeCasedProperties, etc)
`Integer<1e+100>` should be `1e+100`, but it is `never`
`LastArrayElement<[...T[], U]>` should be `U`, but it is `T | U`
`LastArrayElement<[T, ...U[]]>` should be `T | U`, but it is `U`.
Is there a way to check that a key conforms to a base type without using an interface?
Jsonify: `readonly` messes with Jsonified tuple types
'Type instantiation is excessively deep..' error caused by update to `SetRequired<>` in v3.10.0
Helper for `fn(...rest, extra)` ("A rest parameter must be last in a parameter list.")
The peer deps of `typescript` causes it installed in production mode
NonEmptyObject
NonOptionalKeysOf
Proposal: Partial/Complete (curry)
"Stricter" intersection type?
[4.8.0] type error on jsonify
[4.8.0] fails when there are no DOM types
PartialOnUndefinedDeep removes non-optional properties when the input type contains an index signature
How can I use the classic Omit functionality applied to an array type instead of a type?
Number key not work with ObjectValue
Request: `Slice` or `Rest`
Proposal: get the public part of union.
"type-fest": "4.7.0", `PartialDeep` break down 4.6.0 works fine
Proposal: `UnknownArray`
DeepPick and DeepPath
Suggestion: add `ArraySlice` and `StringSlice`
Map field to a type
How to write `if` condition to exclude `EmptyObject`
v4.8.0 break SnakeCasedPropertiesDeep with enum
Missing ArrayIndices and ArrayValues from 4.5.0
`Writable` is not suppert array
Proposal: `SetFieldType`
Writable doesn't only strip readonly from the keys
Generate dot.notation access list for an object
Proposal: Implement autocompletion for `OverrideProperties`
Unable to use `Opaque<Record<a, b>, c>`
Extract `ReplaceDeep` function into a separate module
OverrideProperties marks all properties optional
[Bug]: Class declaration is broken
SnakeCasedPropertiesDeep incorrectly handles readonly arrays
Proposal: `SetRequired`, `SetNonNullable`, `Schema` based on nested key path
Is it possible to conditionally get a property from a nested object?
Type error: '?' expected.
can't destructure FixedLengthArray correctly
merge-deep: wrong types inferred when using partial interfaces
invalid behavior of `IsUndefined`
Issue with the new `IsEqual`
Make `CamelCasedPropertiesDeep` preserve leading underscores
Consider `Concat<T, U>`
Consider `UnwrapPartial<T>` as a way to revert the `Partial<T>` modifier
Is it safe to use these types instead of the built-in ones everywhere?
`StringSlice` is incorrect for union of string literals of different lengths
Vite quite often throws errors from type-fest
Proposal: AllDiscriminatedUnionFields
Add a floating point type perhaps? (Ducks and runs away)
OOMErrorHandler with SetNonNullableDeep
JsonValue but with undefined allowed as well
Consider adopting npm trusted publishing
`RequireAtLeastOneNonNull`
New exports in v5.0.1 are not exported from original source files
`Callback<Value>`
[v5] Export internal types
[IntClosedRange] Incorrect ordering of values in resolved type
`5.0.0` does not work with `rolldown-plugin-dts`
`KebabCasedProperties`: Align behavior with Lodash
Upgrade to 4.41.0 causes `RangeError: Maximum call stack size exceeded`
Add type: RemovePrefix
`PackageJsonStandard.engines` should use `LiteralUnion` to improve IDE autocomplete
The latest v4.41.0 release is broken
Should `If` be exported in `index.d.ts`?
RequiredDeep should only remove undefined if optional and without exactOptionalPropertyTypes
when new release?
ExtractStrict not yet published
`UnionLength`
Define "exports" in package.json for Node.js v26 ESM compatibility.
proposal: strictOmit
Proposal: `TransferReadonlyArrayModifier` type
`Schema<T>` does not work for keys with `{}` values
`Proposal:` String length type
`Proposal`: New Internal for recursion
`Proposal:` Change `TupleOf` implementation.
proposal: remove suffix
`AllExtendUnionMember` type addition
Proposal: merge 3 `Omit` like type into one
Proposal: DistributiveOmit
`CastArray` type
proposal: new option for `condition` options of `ConditionalPickDeep`
is-undefined
`SwitchOnExtends` instead of nested-ternary
"Not" type
AtLeastOneExtend
new eslint plugin
TypeScript build fails with IntRange â excessively deep type instantiation
`ConditionalPickDeep` returns `{}` instead of `never` when no keys match
UnionToTuple incorrect behavior
isUnion incorrect behavior
`ArrayLength` internal type is unused and not exported
`SetRequiredDeep` does not work with generics
`SimplifyDeep` does not simplify types nested in arrays
Create Nullable type
`Merge` is not distributive
`Spread` is not distributive
New Type: AllUnionFields (similar to SharedUnionFields)
Partial type
Remove certain parts from `PickIndexSignature` JSDoc
`StringSlice<S, Start, End>` returns incorrect type when S is non-literal string
`Sum<A, B>` and `Subtract<A, B>` don't work properly for union types
`IsStringLiteral<T>` returns true for string types that have an unconstrained string component
`SetRequiredDeep` doesn't remove optional modifiers from tuples
Proposal: `IsTuple<Type>` & `IsFixedLengthTuple<Type>`
Regression on SetRequired
CamelCase failed (default options)
SetFieldType bug
`SetOptional` remove properties of types with index signatures
Assignability b/w generic `keyof T` and `KeysOfUnion<T>`
Expose `ConditionalSimplify` and `ConditionalSimplifyDeep`
Proposal: `UnknownMap` and `UnknownSet`
`OmitDeep` for array item
`SharedUnionFieldsDeep` with `undefined` in Union
ArraySlice: wrong type for union of tuples
``ArrayTail`` doesn't work when mixed with optional elements
license files not included in published package
`Get<T, Paths>` resolves to `unknown` if `Paths` contains a template literal type
OmitDeep - when omitting multiple optional fields final type goes wrong
Proposal: `TupleToObject<TUPLE>`
UnionToTuple fails when tuple is not ordered
`Arrayable` is unusable
`Exact` no longer works with recursive types + unions
IsAny not working with "any" as generic type argument under different constraint
Non-Empty String Type
Line-wrap all documentation?
`OmitDeep` with multiple properties to omit
Distributive conditional with LessThan
How about this easy Implementation of Or and And utilities?
Split has a different behavior depending on the position of ${string} in tempalte literal types
`ExtendsStrict`, `ExtractStrict` and `ExcludeStrict` are not exported
Bug ConditionalPick
đ Enhance the `type-fest` file structure using a category-based layout
`Jsonify<unknown>` should be either `unknown` or `JsonValue`
[bug] type-fest is unusable in Deno due to missing `exports` in package.json
`XO`: Unable to add `Comments` in generic types arguments
SingleKeyObject always returns never
`StringKeyOf` name is misleading
Remove redundant code for compatibility with older versions of typescript
`PickDeep` does not consider unions that don't include the path
Compatibility with JSR
Code snippets in JSDoc don't indent properly
Suggestion to include documetation on `Awaited` Type in README
`CamelCasedPropertiesDeep`/`SnakeCasedPropertiesDeep` breaks `unknown` values
PartialDeep doesn't make properties undefined if there's a call signature
Error after update in OptionalKeysOf
Regression 4.38.0 PartialDeep x strictNullChecks=false
WritableKeysOf return type has undefined
Should `Promisable` also include `Promise<T>`?
Can i use GreaterThan as parameter type?
MergeDeep takes type of property of source instead of using the destination type in case of undefined value
KebabCasedProperties transforming `:` to `-:`
Pass Options generic to SnakeCasedPropertiesDeep
`CamelCasedPropertiesArrayDeep` has same `Value extends readonly [...infer U, infer V]` condition
Export `UnknownObject` or `UnknownRecord`
Extend 'Paths' with n-level deepness
A test dependency is used in an exported code
Camelcase capital letters misunderstood by DelimiterCase type
Add `SetNonNullable` type
Feature Request: CamelCase to behave like lodash.camelCase and camelcase
Strict versions of Extract and Exclude
Proposal: `Includes` type
Proposal: AtMostOne
Feature Request: add `Paths` type
Add a `ReadonlyKeys` which finds readonly keys
PartialDeep does not work with `Date` type
[1.1.0] new version requires lib to include es2020 or later
PackageJson type does not contain known properties for "publishConfig"
Add @category JSDoc tag to improve reference docs generation
Proposal: `AppendKeys` `PrependKeys`
Add `typesVersion` property to `TypeScriptConfiguration` interface
MergeExclusive is broken when used together with Except or built-in Omit
Behavior of `PascalCase`
The `noImplicitOverride` and other options are missing
v1 produces a TypeScript compiler error
Question: Is it possible to get compile error with "Get"?
[snowpack] Unable to find any entrypoint for "type-fest". It could be a typo, or this package might not have a main entrypoint.
Proposal: `ScreamingSnakeCase` type
Use semver versioning
Typo in `Entries` example
Can't install `type-fest`
Need some help to understand `string extends S`
argument dynamically optional
Asyncify lost the general return type
Add IsUnion<T>
Fix Union type with DeepMap?
[Proposal] Adding in my types
ConditionalKeys didn't work fine as expected
Like `Promisable<X>` but for arrays: `X | X[]`
Proposal: `Indexify`
RequireOnlyOne
Proposed paradigm (functional assertions)
Proposal: `InvariantOf`
question: I just wonder why this module is installed without '-D' .
npm registry error
Integer value comparison, minimum length array, useful?
is there a way to create regex patterns to match strings?
ObservableLike's subscribe() return type should have unsubscribe()
Proposal: `Overwrite<Obj, Props>`
`PromiseValue` will no longer be needed in TypeScript 4.5
Proposal: `RequiredDeep`
Make `JsonObject` work as expected with TS 4.4 `--exactOptionalPropertyTypes`
ArrayValue<T>
Add Transparent to reverse Opaque
Except broken after 2.3.1
`LastArrayElement<string[]>` emits `never`
Meta: Add validation check to ensure all files in `source` directory use `.d.ts` extension
Add `WritableDeep<T>` - The inverse of `ReadonlyDeep<T>`
`Jsonify` recursive cast properties of Date instead of cast to string
Add `isObject`
Anyone know how to turn "A" | "B" => ["A", "B"]?
Proposal: `GlobalConstructor`
Error using type-fest with TypeScript version lower than 3.8.0
Get type works incorrectly with tuples, it treats tuples as arrays and thereby makes it possible to access indexes that are not defined on the tuple.
Proposal: `IsUnion`
CamelCase doesn't properly format ScreamingSnakeCase strings
Except is broken when used with generic property
Proposal: PartialRecord
Proposal for ModifyType ?
Except not removing keys as Omit does
Question: is there any way to get the advantages of opaque and other options at the same time?
`Opaque` forces lookup to `any` type because it cannot be used to index `Record` type
Proposal: DeepRecord
Proposal: FixedLengthArray
Documentation improvement request: Merge versus intersection
`AsyncReturnType` doesn't work with arguments
AsyncReturnType doesn't work
Upgrade the `tsd` dependency
Add `WithReturnType` type?
Add `Stringified` type
Proposal: ThenArg
`PackageJson` is not a valid `JsonObject`
Comparison to `ts-essentials`
Opaque types are interchangeable
Entry/Entries
Proposal: OneOrMore
JsonObject doesn't allow optionals
Docs: Partial Example Error from v3.5.1
Proposal: Dictionary
`RequireAtLeaseOne` issues
Proposal: ValueOf
Add `Optional` type
Proposal: PartialExcept
`RequireOnlyOne` type
Proposal: Constructor
Proposal: Opaque
Proposal: AsyncReturnType
Proposal: ExcludeProps
Proposal: SubType
Proposal: `ArrayTail`
type-fest@0.20.1 typescript@4.1.2 SnakeCase has bug
Proposal: `Exact` and `ExactDeep`
Is the `Class` type misnamed?
Document new built-in TS types
Proposal: `PartialMutable` type
Bug: 0.20.0 fails to compile under yarn2 pnp
Proposal: `MergeDeep` type
Proposal: `CamelCasedProperties` type
Proposal: Enhanced `document.querySelector` type
Proposal: Key path type
[Proposal] Writable and SetWritable
[Proposal] SetNonNullable
xo currently fails when installed with yarn 1.x
Can I just install with devDependencies instead of dependencies?
SnakeCasedPropertiesDeep Incorrectly Converts Record<String, _>
Template literal type ideas
Proposal: TypeToJSObject
Proposal: A version of Pick that distributes over union types
Simplify `PromiseValue` type when TS 4.1 can be targeted
Proposal: `IfAny`, `IsAny`, `IsUnknown`, etc
Proposal: `Asyncify`
Proposal: `ReplaceReturnType`
Can't resolve type-fest
A range of numbers
Separate the standard PackageJson types into it's own type
ConditionalKeys<Base, Condition> fails when used on Arrays
Proposal: ArrayItem
Proposal: `Must`
@ReadonlyDeep generic type
I tried to make all these types globally available in my project, but I failed.
Importing `type-fest` unable to resolve module.
Conditional pick deep not compiling, internal?
Suggestion: type for Object.fromEntries
0.7.1 or 0.21.3: TS2344: Type 'BaseType' does not satisfy the constraint 'Record<string | number, any>'.
Inconsistency between change case with non-literal strings
Use the new `satisfies` operator?
Standard npm package.json `workspaces` field is missing from PackageJson type
Constraints of SetOptional may make you write bad code
`Exact` does not work with `Opaque` after 2.19.0
`Merge` merges optional `any` incorrectly
`MapKeys` type
`CamelCase` does not properly camelize consecutive characters
Problem with `SetNonNullable` in Type Predicate Context
`NonEmptyTuple` type
`type CamelCasedPropertiesDeep` converting Record into {}
Proposal: DiscriminateUnion
Add `SimplifyDeep` type
Jsonify does not look deeper than one `toJSON` level
`Type instantiation is excessively deep` in `ReadonlyDeep`
I think I found a bug in your Jsonify type?
Suggestion: Make `SetNonNullable` 2nd Generic Optional
Version upgrade causes seemingly unrelated TS errors
`ReadonlyDeep` not working with TypeScript 4.8
Jsonify Map type returned as `{}`
Tests no longer run with xo v0.52.2
v5
ConditionalPickDeep
Breaking change to `Simplify<>` introduced in v2.16.0
Suggestion: deep version of StringKeyOf
Proposal: `SetNonNullable`
Incorrect `Merge` with optional `any` fields
WritableKeysOf
Proposal: NonEmptyArray
OverrideProperties doesn't throw an error if it has one correct property
`SetRequired` incorrectly combines union types
Optional tags are lost after merge
Opaque not working correctly?
Add typescript 4.7 as a peer dependency?
[MergeDeep] No attempt merge on Destination + Source types
How would I do something like "require 2 props or this 1 other prop"?
A Constructor within a ReadonlyDeep type is not callable
Multi-replace type
Add a type for merging classes
How to have unknown keys return `never` with `Get` type?
Prettify utility
`Override<{a: number, b: number}, {a: string}>` for unions that override props from the previous object
`Simplify` does not transform deep/recursively
feature request: Omitdeep
ConditionalPickDeep includes Array prototype properties & methods
Allow `SetRequired` to specify internal properties (aka optic)
NonNegativeInteger doesn't work
Eslint complains when updating type-fest
`Except` is not strict
Add `Date` to DeepPartial type helper
TsConfigJson should extend Jsonifiable
Exact incorrectly handles optional object with union type
Transpose or invert object keys to/from key-like literal values
Feature request: `IsStringLiteral`
`IsEqual` identity issues
Proposal: Merge Compatible Deep
Intersect interfaces, but "union" properties
Proposal: Jsonifyable
Unable to use prototype property of type constructed with Class utility
feat: Sister of Except, stricter version of Required
Exclude `Date` and `RegExp` in all "deep" methods
Export `IsEqual` type
Question: ExclusiveArray
idea: Omit/PickDeep type
Proposal: `StringKeyof`
Proposal: `IsLiteral`
Proposal: `LiteralToPrimitive`
`ReadonlyDeep` does not work for objects with call signatures
How to use `Float`/`Integer`?
Float type does not allow whole number floats
Float type support
ReadonlyDeep is inconsistent with typescript eslint's isTypeReadonly with regard to readonly sets and map
Cannot copy Date type via CamelCasedPropertiesDeep
option interface field
Proposal | Add an Paths type thats returns all valid paths to JSON like values
Get type should be able to return never so it can be used in a conditional type
Proposal: Strict `Get`
`Jsonify` removes all optional properties
Deprecate `PromiseValue`
Add an IfElse type as ternary expression alternative
Feature: add PartialBy<T, K>
Make `GetWithPath` public
Merge type increases type instantiations count drastically
Title Case
Improve `Opaque` type to encapsulate unique symbol tag
`PartialDeep` & `error TS2589: Type instantiation is excessively deep and possibly infinite`
Proposal: NonDiscriminatedUnion
Provide playground link in readme and new issues
Jsonify support for optional object keys, unserializable object values
Require at least one element in arrays or function arguments (`RequireAtLeastOne`)
`Exact` intersection type support
TypeScript 4.7 `TsConfigJson.Module` updates.
Trim but with characters other than whitespace
`Jsonify` problems
`Merge` type does not handle correctly optional properties
Add `PartialOnUndefined` type
Mutable: rename as Writable (or ReadWrite)
Add `EmptyObject` (the type you'd expect for `{}`)
Add type for union joins
CamelCase<string> is of type 'never' ?
v3
Improve documentation and tests
`DelimiterCase` not support `ScreamingSnakeCase` input
Merge is not that useful with indexed types
Proposal: KeysOfUnion, `keyof` Union type
add SetExclude and SetExtract
[Feature] ReturnTypeWithGenerics
SetRequired not allowing other optional fields
`PackageJson` `Exports` type should include `null`
Is there any runtime function for `CamelCasedPropertiesDeep`
Add `AbstractClass<T>`
Add `eslintConfig` to `PackageJson` type
Discussion/proposal: PartialDeep<Foo, {recurseIntoArrays: false}>
DelimiterCasedPropertiesDeep with Opaque yields wrong type
FR: make a dark mode compatible logo
Except no longer prevents the omitted keys to be keys present on the given type
© 2019 BoostIO, Inc.