Releases: Veetaha/ts-typedefs
Releases · Veetaha/ts-typedefs
ts-typedefs 3.2.0
View changes
Language support
- "typescript" package peer dependency minimum version was updated to 3.7.x
New units
MutuallyExclusive<>
- type to declare mutually exclusive object types (union of objects discriminated byundefined
property values)
ts-typedefs 3.0.0
View changes
Language support
- Added support for
typescript 3.5+
.
Removed
Op.UnionNotIncludes<>
, useOp.UnionExcludes<>
instead.
Breaking changes
Obj<>
defines an object withany
value type instead ofunknown
value type by default. This decision was made due to the default generic type arguments behavior changes see this issue for details. Since the behavior has changed, leavingunknown
as the default would prevent the library from compiling.
New units
TupleFirstItem<>
TupleLastItem<>
TupleShift<>
TuplePop<>
TupleUnshift<>
TuplePush<>
ts-typedefs 2.5.0
View hanges
Compatible changes
PropertyDecorator<>
now accepts the second optional argument (property name limit).MethodDecorator<>
now accepts the third optional argument (method name limit).AccessorDecorator<>
now accepts the second optional argument (accessor property name limit).
Bug fixes
FindKeys<>
andFilterProps<>
respectively now do not return an object withundefined
property when searching/filtering an object type with optional properties.
ts-typedefs 2.4.0
View hanges
Deprecated units
- Removed
MarkKeyOptionalIfUndefined<>
New units
Prototypeful<>
InstanceType<>
NonNullableProps<>
DeepMapValues<>
PickAsNonNullableProps<>
ts-typedefs 2.3.0
View hanges
Deprecated units
All deprecated units will be removed in the next minor update.
MarkKeyOptionalIfUndefined<>
- renamed toOptionalLikelyUndefProps<>
Compatible changes
AccessorDecorator<>
first argument is nowany
by default
New units
PickAsOptional<>
PickAsRequired<>
PickAsReadonly<>
PickAsMutable<>
PickAsNullableProps<>
Bug fixes
PropertyDecorator<>
now takes optional properties into account.
ts-typedefs 2.2.0
View changes
Compatible changes
Mutable<TObj, TKeys = keyof TObj>
- now accepts the second optional argument.
New units
IsNullable<>
CanBeNull<>
CanBeUndef<>
NullableProps<>
- More flexible versions of standard typedefs:
Partial<TObj, TKeys = keyof TObj>
Required<TObj, TKeys = keyof TObj>
Readonly<TObj, TKeys = keyof TObj>
Bug fixes
- Fixed definition of
DeepRequired<>
, now it works correctly for any nested object types.
ts-typedefs 2.1.1
View changes
Compatible changes
- Changed
ReadonlyObj<>
andObj<>
TKey
constraints toPropertyKey
and default values toany
Internal
- Optimized instantiation of
MarkKeyOptionalIfUndefined<>
type.
ts-typedefs 2.1.0
View changes
Breaking changes
typescript
was moved fromdependencies
topeerDependencies
.Not<T, ...>
type now expands to the second optional argument (never
by default) instead oftrue
whenT
is exactly ofboolean
type.If<TCond, ...>
type now expands to the fourth optional argument (never
by default) instead of else branch whenTCond
is exactly ofboolean
type.
Compatible changes
Not<>
now accepts the second optional argument (see in docs).If<>
now accepts the fourth optional argument (see in docs).
New units
AreSame<>
Is[Not]Unknown<>
Is[Not]Any<>
Is[Not]Never<>
NotExtends<>
UnionExcludes<>
Removed
literal()
: use newvalue as const
syntax.
Bug fixes
Op.UnionIncludes<TNeedle>
now definestrue
ifTNeedle
is an item of the checked type union, but not on the contrary (as it was previously).
Internal
- Refactored tests structure.
- Removed unnecessary
tsconfig.json
options.
ts-typedefs 2.0.1
View changes
- Migrated to
TypeScript 3.4.1
- Fixed breaking change:
FilterProps<>
argument operator tree deepness must be one level less from now as it causedExcessively deep
compile error literal()
runtime function is deprecated, use newvalue as const
syntax instead ofliteral(value)
- Fixed breaking change:
- Added types
Tag<>
Op.NotExtends<>
Op.UnionNotIncludes<>
ts-typedefs 1.4.0
View changes
Added FuncContext
type to infer typeof this
for the given function.