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
"Writable" is imported from external module "./writable.js" but never used in
NonNullableDeep
`Paths` should not recurse into `Map`'s prototype properties.
ConditionalPickDeep does not work with deep interfaces
`Addition` And `Subtraction` Type Proposal
`MergeDeep` removes optionals from `any` and `never` fields
MergeDeep is never when compiled to .d.ts
ReadonlyDeep turns `void` into `unknown`
Canary: `MergeDeep` failures in `typescript@next` not detected by canary tests
4.9.0 fails with "Cannot find module './camel-case' or its corresponding type declarations"
IfType type guards
`PackageJson`: Why properties like `name` and `version` are not required?
`Get<BaseType, Path>` does not work when `Path` contains `${number}`
Map field to a type
v4.8.0 break SnakeCasedPropertiesDeep with enum
"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`
ArrayExceptLastElement type
TS 5.4.2 breaks `ConditionalKeys` and `SetParameterType`
A Constructor within a ReadonlyDeep type is not callable
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?
Make the second argument to RequireAllOrNone optional
IfAny circular constraint in TS 5.4+
Set up dependabot / renovate
Run `tsc` on all test files
`ReadonlyDeep` / `WritableDeep` not modifying arrays as of TS 5.3.3
SetRequiredDeep - is it possible?
`ArraySlice` should support spread array
`RepeatString` type
`UnionToUnorderedTuple` type
CamelCasedObjectDeep breaks tuple-types into array-types
Bug: Nextjs and type-fest camel-case.d.ts Type error: '?' expected.
Require exactly one key of type `string`
Why do we need to specify the `engines` field in package.json?
OptionalExcept type
Maintenance strategy: Considering splitting `type-fest` into smaller importable parts
IntRange Inclusive
[4.10.0][Regression] failure when type checking with exactOptionalPropertyTypes
Feature Request (or bug report?) - Get the last key of a record
The peer deps of `typescript` causes it installed in production mode
Jsonify fails on nested object with name property.
`MergeDeep` doesn't preserve `readonly` modifier
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.")
Expose `UnknownRecord` in the public API
NonEmptyObject
Add `SetReadonly`
NonOptionalKeysOf
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"?
Add a type for merging classes
`UndefinedOnPartialDeep` (opposite of `PartialOnUndefinedDeep`)
Missing ArrayIndices and ArrayValues from 4.5.0
`Writable` is not suppert array
Proposal: `SetFieldType`
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.
How to write `if` condition to exclude `EmptyObject`
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`
`Jsonify<unknown>` should be either `unknown` or `JsonValue`
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
is-undefined
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
Upgrade to 4.41.0 causes `RangeError: Maximum call stack size exceeded`
[bug] type-fest is unusable in Deno due to missing `exports` in package.json
SingleKeyObject always returns never
`StringKeyOf` name is misleading
`PickDeep` does not consider unions that don't include the path
Compatibility with JSR
Code snippets in JSDoc don't indent properly
Distributive conditional with LessThan
`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>`?
Consider `Concat<T, U>`
TypeScript build fails with IntRange â excessively deep type instantiation
`ConditionalPickDeep` returns `{}` instead of `never` when no keys match
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
`RequireAtLeastOneNonNull`
merge-deep: wrong types inferred when using partial interfaces
invalid behavior of `IsUndefined`
Issue with the new `IsEqual`
Can i use GreaterThan as parameter type?
Consider `UnwrapPartial<T>` as a way to revert the `Partial<T>` modifier
`StringSlice` is incorrect for union of string literals of different lengths
Vite quite often throws errors from type-fest
Proposal: AllDiscriminatedUnionFields
OOMErrorHandler with SetNonNullableDeep
JsonValue but with undefined allowed as well
can't destructure FixedLengthArray correctly
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`
Expose Max Recursion Depth of Paths
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
Suggestion to include documetation on `Awaited` Type in README
`ArraySlice` resolves to `never` when passing `number`
4.23.0 introduced a breaking change in `Paths` type
Issues with `Paths` type
`Get<T, Paths>` resolves to `unknown` if `Paths` contains a template literal type
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
Paths<T> should handle recursive types
ConditionalKeys does not correctly filter out `never` type
`And` and `Or` is not exported at `index.d.ts`
Proposal: `IsTuple<Type>` & `IsFixedLengthTuple<Type>`
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
`OmitDeep` for array item
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
Zero is not exported by ...
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`
New Type: AllUnionFields (similar to SharedUnionFields)
`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
[snowpack] Unable to find any entrypoint for "type-fest". It could be a typo, or this package might not have a main entrypoint.
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`
Camelcase capital letters misunderstood by DelimiterCase type
v1 produces a TypeScript compiler error
Question: Is it possible to get compile error with "Get"?
Proposal: AtMostOne
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
Add Transparent to reverse Opaque
type-fest@0.20.1 typescript@4.1.2 SnakeCase has bug
Add `isObject`
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>
Like `Promisable<X>` but for arrays: `X | X[]`
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
Proposal: `Exact` and `ExactDeep`
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
The `noImplicitOverride` and other options are missing
Add `SetNonNullable` type
Feature Request: CamelCase to behave like lodash.camelCase and camelcase
Strict versions of Extract and Exclude
Proposal: `Includes` type
Opaque types are interchangeable
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
`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`
Entry/Entries
Proposal for ModifyType ?
Proposal: OneOrMore
JsonObject doesn't allow optionals
Docs: Partial Example Error from v3.5.1
Proposal: Dictionary
`RequireAtLeaseOne` issues
Proposal: ValueOf
Proposal: PartialExcept
`RequireOnlyOne` type
Proposal: Constructor
Proposal: Opaque
Proposal: AsyncReturnType
Proposal: ExcludeProps
Template literal type ideas
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?
Proposal: `ArrayTail`
Integer value comparison, minimum length array, useful?
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
v5
Problem with `SetNonNullable` in Type Predicate Context
`NonEmptyTuple` type
`type CamelCasedPropertiesDeep` converting Record into {}
I tried to make all these types globally available in my project, but I failed.
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
`CamelCase` does not properly camelize consecutive characters
ConditionalPickDeep
Breaking change to `Simplify<>` introduced in v2.16.0
Suggestion: deep version of StringKeyOf
Proposal: `SetNonNullable`
`Override<{a: number, b: number}, {a: string}>` for unions that override props from the previous object
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.
`Jsonify` problems
`Merge` type does not handle correctly optional properties
Add `PartialOnUndefined` type
Transpose or invert object keys to/from key-like literal values
How to have unknown keys return `never` with `Get` type?
Prettify utility
Incorrect `Merge` with optional `any` fields
`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
Mutable: rename as Writable (or ReadWrite)
Feature request: `IsStringLiteral`
`IsEqual` identity issues
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
`Jsonify` removes all optional properties
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
Intersect interfaces, but "union" properties
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`
idea: Omit/PickDeep type
Deprecate `PromiseValue`
Feature: add PartialBy<T, K>
Make `GetWithPath` public
Merge type increases type instantiations count drastically
Title Case
`PartialDeep` & `error TS2589: Type instantiation is excessively deep and possibly infinite`
SnakeCasedPropertiesDeep Incorrectly Converts Record<String, _>
Proposal: `Indexify`
RequireOnlyOne
Proposed paradigm (functional assertions)
Proposal: `InvariantOf`
question: I just wonder why this module is installed without '-D' .
npm registry error
Add `AbstractClass<T>`
Add `EmptyObject` (the type you'd expect for `{}`)
Add type for union joins
CamelCase<string> is of type 'never' ?
v3
Proposal: NonDiscriminatedUnion
`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`
Proposal: SubType
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
ReadonlyDeep is inconsistent with typescript eslint's isTypeReadonly with regard to readonly sets and map
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
Š 2019 BoostIO, Inc.