Breaking
- This package is now pure ESM. Please read this.
- Require TypeScript 5.9 b5b0214
- Require Node.js 20 cc2b0f2
- Reminder:
type-fest
requiresstrict: true
in your tsconfig. StringKeyOf
: Rename toKeyAsString
e492c9cArrayTail
: EnablepreserveReadonly
by default and remove the option b34b1d8CamelCase
/CamelCasedProperties
/CamelCasedPropertiesDeep
/PascalCase
/PascalCasedProperties
/PascalCasedPropertiesDeep
: DisablepreserveConsecutiveUppercase
by default 8226c1b- This aligns it with the general JavaScript naming convention.
PartialDeep
: DisableallowUndefinedInNonTupleArrays
by default b3c4524Split
: EnablestrictLiteralChecks
by default 544a846Paths
: DefaultmaxRecursionDepth
5 (was 10) 2ab5decObservableLike
: Move to sub-export 2a1072e- Deprecate
If*
types in favor of a singleIf
4c2151a
New types
Alphanumeric
— Single alphanumeric character (A–Z
,a–z
,0–9
). 484e030AllExtend
— Evaluates totrue
if every element of a tuple/array extendsU
. c8c6d55ConditionalSimplify
— Simplifies a type’s unions/intersections with opt-in controls. b7a4771ConditionalSimplifyDeep
— Deep version ofConditionalSimplify
that recurses into objects. b7a4771DigitCharacter
— Single ASCII digit character (0–9
). 484e030ExcludeStrict
— Non-distributive, stricter variant ofExclude<T, U>
. e6f62a2ExtendsStrict
— Non-distributiveA extends B
check. d71242aExtractStrict
— Non-distributive, stricter variant ofExtract<T, U>
. 98d24faIsLowercase
— Evaluates totrue
if a string literal is all lowercase. afe132cIsNullable
— Evaluates totrue
ifT
includesnull
. 5067e25IsOptional
— Evaluates totrue
ifT
includesundefined
. 5067e25IsOptionalKeyOf
— Evaluates totrue
if propertyK
ofT
is optional. 93728b5IsReadonlyKeyOf
— Evaluates totrue
if propertyK
ofT
is readonly. 93728b5IsRequiredKeyOf
— Evaluates totrue
if propertyK
ofT
is required. 93728b5IsUnion
— Evaluates totrue
ifT
is a union type. b3d92edIsUndefined
— Evaluates totrue
if the type is exactlyundefined
. f7bc576IsUppercase
— Evaluates totrue
if a string literal is all uppercase. afe132cLowercaseLetter
— Single lowercase Latin letter (a–z
). 484e030RemovePrefix
— Removes a specified prefix from a string literal. 18a1c04UppercaseLetter
— Single uppercase Latin letter (A–Z
). 484e030
Improvements
Jsonify
: Handleunknown
asJsonValue
642bb13SetRequired
/SetOptional
/SetReadonly
: Handle functions with properties a5e45d4Schema
: Preserve arrays/remove extraneous unions 8a96def; dropundefined
forrecurseIntoArrays
1cb955bReadonlyKeysOf
/WritableKeysOf
: Addobject
constraint a6efbe0TsConfigJson
: Add TypeScript 5.9 fields d2bda94
Fixes
Or
: Fix withboolean
,never
,any
42d6106And
: Fix withboolean
,never
,any
b38ac60IsStringLiteral
: Fix uncollapsed unions, and tagged types eb37799 / d1b35c7Paths
: Fix behavior with index signatures 9926e5dConditionalKeys
: Fix behavior with arrays and unions 4d7cc50RequiredDeep
: Fix withundefined
bfcdbc4Split
: Fix template strings ending with interpolation 853b881ArrayTail
: Fix fix non-tuple arrays f3aabd8- Fix
UnionMin
andUnionMax
d52d5e7
Meta
Huge thanks to all the contributors to this release, especially @som-sm 🙌