- Rule IsObject produces issue for arrays.
- Rule IsArray produces issue for objects.
- Use classes for method and properties.
- Rewrite to typescript.
- Make rules inspectable. Rewrite
select
rule:Type.select( [({type}) => type === 'user', UserShape], [({type}) => type === 'post', PostShape], )
- Make type rules switch each other.
- Add
optional
,is
andcustom
checks. - Add strict type implementation.
- Code refactored.
- Decorators:
- Function arguments decorator.
- Function return value decorator.
- Add
select
checker which can determine what rules to use:// Select type by value's `type` property. Type.select( ({type}) => type === 'user' && userShape, ({type}) => type === 'file' && fileShape, () => linkShape, // otherwise );
- Allow properties replace previous value:
now works correct.
Typed.instanceOf(Date).instanceOf(Object)
- replace
addChecker()
withaddProperty()
andaddMethod()
.
- make TypedProps instance immutable.