A generic typearg for ArrayPredicate and ObjectPredicate. So ow.array.ofType(ow.string) infers string[] and ow.object.exactShape({ foo: ow.string, bar: ow.object.exactShape({ baz: ow.number }) }) infers { foo: string; bar: { baz: number } }
A Shape -> TypeOfShape helper
Changes:
The optional modifier now makes each predicate ThePredicate<T | undefined> rather than Predicate (which could lead to uncaught NREs)
The hidden create-constructor-function-thing is no longer allowed to receive undefined for any value, since undefineds should now be properly tracked.
Fixes #159
Also adds:
ow.array.ofType(ow.string)
infersstring[]
andow.object.exactShape({ foo: ow.string, bar: ow.object.exactShape({ baz: ow.number }) })
infers{ foo: string; bar: { baz: number } }
Changes:
optional
modifier now makes each predicate ThePredicate<T | undefined> rather than Predicate