Releases: ts-essentials/ts-essentials
Releases · ts-essentials/ts-essentials
v10.1.1
v10.1.0
Minor Changes
- 39d315e: Implement
DeepMarkRequiredutility type that constructs a type by picking all properties from typeType
where properties by pathsKeyPathUnionare set as required - f7c2c36: Implement
DeepMarkOptionalutility type that constructs a type by picking all properties from typeType
where properties by pathsKeyPathUnionare set as optional
v10.0.4
Patch Changes
- ecb490b:
Head<Type>no longer includes an extraneous| undefinedwhen instantiated with a union of empty and
non-empty tuple, like[] | [1, 2] - 859d85c:
MarkOptional<Type, Keys>is now assignable toPartial<Type> - dda4def:
Tail<Type>now works with readonly arrays and also correctly returns the tail for tuples with all optional
members. Additionally, it now acts as an identity for non-tuple arrays, i.e., it returnsTypewhenTypeis a
non-tuple array, such asstring[],number[], etc. - d02bf22: Fix
MarkRequired<Type, Keys>&MarkWritable<Type, Keys>types whenKeysisany - d3b56d7: Prettify the output of
Mark-*andMergetypes
v10.0.3
Patch Changes
- cc7b838:
ReadonlyKeys<Type>andWritableKeys<Type>now return only the readonly and writable keys, respectively,
for arrays and tuples - d6867ea:
Prettify<Type>returns the same type when the type parameter is a function - bc51ac5:
OptionalKeys<Type>returnsneverfor primitives and returns only optional indices for arrays and tuples - d0ad79f: Improve
Pathsperformance by limiting the depth of paths to 7 (default) - 162fd9d: Add
Paths<Type, { anyArrayIndexAccessor: '*' }>, a string literal representing a catch-all or "wildcard"
when indexing on arrays.
v10.0.2
v10.0.1
v10.0.0
Major Changes
- b127a8a: Use TypeScript@^4.2.0 because of excessively deep and possibly infinite type instantiation limitation for
PathValueandPaths - 26be790: Fixed assignability of Mark* utility types which required removing support of TypeScript@<4.5
- 9935d80: Added
StrictDeepOmitandStrictDeepPickthat support generic type and removed generic constraint on the
second type parameter ofDeepOmitandDeepPick
Minor Changes
- 5b7650a: Add variadic XOR, up to 50 generic types
- b127a8a: Implement
PathsandPathValueto access object properties, array/tuple indices