type-plus
-
v3.0.0
Published by unional about 4 years ago
3.0.0 (2020-10-13)
Bug Fixes
- add generics to AnyFunction (4e9b8eb)
- adjust list() type (279feca)
- boolean negative check (a317c15)
- build and add ts-ignore (702be31)
- CanAssign for boolean type (ef31c2a)
- CanAssign<boolean, boolean> (1585009)
- change Brand generic type order (c785ef2)
- change record to string based only (688c413)
- clean up types (045469b)
- clean up types v2 (af6d919)
- clean up types v3 (cf0b08a)
- const number negative tests (8cc8115)
- const string negative tests (730d394)
- fix IsDisjoint<> but there is a bug in TypeScript (dd0e148)
- implement and simplify record() (c7496ac)
- improve AllTypes (8f1659d)
- logical types with boolean type (74cc46e)
- make TupleDevice tail type degenerate (9047a5b)
- move satisfy under types (6df34b9)
- multi violations drilldown (7a962fe)
- object report should have space between prop (1bb90c2)
- passing ts on return type (4c62fe9)
- remove Id type (e8bc64c)
- rename val() to create() (6addb41)
- restrict ExcludeProtType to record (3c135db)
- simplify AllTypes (4c36631)
- simplify Object type processing (cd425da)
- type
this
arg for everyKey()
(887d5cf)
- TypeEquals against boolean (901f4ae)
- Types.Number should be number and not 0 (d185d24)
- update logica types to propagate boolean (be55b64)
- use AndS and NotS for IsDisjoint for the time being (babf650)
- use typeSym for Brand and Flavor (90e61ec)
Features
BREAKING CHANGES
use TypeEquals<A, B>
instead.
Brand
and Flavor
is sufficient and provide the needed functionality.
- remove createBrandCreator()
use brand(type)
instead
Use createId(type)
instead.
Same as tryAssign()
,
use assertType.isTrue/False()
with TypeEquals
instead.
Can be replaced with:
assertType.isTrue(true as TypeEquals<typeof a, typeof b>)
assertType.isFalse(false as TypeEquals<typeof a, typeof b>)
- remove checkUnknown
- remove assertUnknown
assertType() provides the same functionality
- remove assertType.isNever()
It is a type-only check.
Does not align with other tests.
Use assertType<never>()
instead
- Brand and Flavor type has changed
It actually should not be breaking so to speak,
but just in case if there are multiple libraries doing brand and somehow something is not correct.
feat: add optional export