All essential TypeScript types in one place 🤙
IsAny
which returns true if it's any
, otherwise falseArrayOrSingle
DeepPick
with the validation of the filterCamelCase
and DeepCamelCaseProperties
for converting it from other casesDeepOmit
and DeepPick
DeepOmit
by removing 4 intersections for objects and applying generic restriction for FilterPropertyKey
with KeyofBase
to tolerate keyofStringsOnly
option in TypeScriptOptionalKeys
and RequiredKeys
for union of objectsDeepRequired
as recursive Required
without removing null
and undefined
ReadonlySet
and ReadonlyMap
in DeepUndefinable
with other sets and mapsDeepPartial
and Buildable
for unknown
ReadonlySet
and ReadonlyMap
in DeepNullable
with other sets and mapsDeepRequired
and DeepNonNullable
in READMEStrictOmit
DictionaryValues
for SafeDictionary
with number and string literals keysStrictOmit
returns never
for arrays and tuples⚠️ Warning: isn't working with [email protected], please either downgrade to v7.0.3 or upgrade to TypeScript@^4.1.0
typescript@^4.0.0
StrictExtract
to check the original structure of type and extract it correctlyMergeN
: you can pass tuple of size N and it will recursively apply Merge
DeepReadonly
support for unknown
typeIsTuple
now works with any tuple lengthOpaque
⚠️ Warning: isn't working with [email protected], please either downgrade to v7.0.3 or upgrade to TypeScript@^4.1.0
ElementOf
https://github.com/krzkaczor/ts-essentials/pull/181
Opaque
change order of arguments [BREAKING CHANGE] by @krzkaczorSafeDictionary
make it work with finite types in an expected way [BREAKING CHANGE] by @akwodkiewiczNewable
type by @krzkaczorDeepUndefinable
by @akwodkiewiczElementOf
by @quezakRequiredKeys
and OptionalKeys
by @bbarryDeepOmit
optional members by @bbarry