ts-essentials
Advanced tools
Changelog
10.0.3
ReadonlyKeys<Type>
and WritableKeys<Type>
now return only the readonly and writable keys, respectively,
for arrays and tuplesPrettify<Type>
returns the same type when the type parameter is a functionOptionalKeys<Type>
returns never
for primitives and returns only optional indices for arrays and tuplesPaths
performance by limiting the depth of paths to 7 (default)Paths<Type, { anyArrayIndexAccessor: '*' }>
, a string literal representing a catch-all or "wildcard"
when indexing on arrays.Changelog
10.0.2
DictionaryValues
in favour of ValueOf
PathValue
Changelog
10.0.1
PickKeys
, OmitProperties
and PickProperties
that reduced the number of
instantiations by ~20-40% on averageChangelog
10.0.0
PathValue
and Paths
StrictDeepOmit
and StrictDeepPick
that support generic type and removed generic constraint on the
second type parameter of DeepOmit
and DeepPick
Paths
and PathValue
to access object properties, array/tuple indicesCONVENTIONS.md
for reliable, consistent and predictable developmentDeepRequired
.isExact
Changelog
9.4.2
WeakKey
for WeakSet
and WeakMap
)Changelog
9.4.1
Changelog
9.4.0
typescript
optional as a peer dependencyChangelog
9.3.2
DeepPartial
, DeepRequired
, DeepWritable
and DeepReadonly
can update structure of Error
or interface
which extends Error
isTuple
, DeepNullable
, DeepPartial
, and DeepUndefinable
Changelog
9.3.1
Tuple
's type implementation to only use a tuple type (instead of a union of a tuple type and an
array type).__OPAQUE_TYPE__
in Opaque
that cannot be used outside of ts-essentialsNonEmptyObject<T>
to not allow primitivesValueOf
utility type to cover the edge casesChangelog
9.3.0
ReadonlyArrayOrSingle
which is a counterpart to ArrayOrSingle
with the array being readonlycreateFactoryWithConstraint
Tail
to use variadic tuple typeDeepReadonly
for a union with an array of itselfMarkRequired
, MarkOptional
, MarkReadonly
and MarkWritable
StrictExtract
usage for TypeScript@^4.6.0