simple-runtypes
Advanced tools
Changelog
7.0.0
nullable
to nullOr
to be consistent with undefinedOr
(because undefinable is not a good name)undefinedOr
that works like the old optional
typerecord
s:
Change optional
to be only usable in record
.
Using it will result in the key to be infered as optional:
record({key: optional(number())})
results in {key?: number}
as the type
(old behavior would infer {key: undefined | number}
, you can get the old
behaviour by using undefinedOr
instead of optional
)dictionary
and remove numberIndex
and stringIndex
Use dictionary(stringAsInteger(), otherType)
to replace numberIndex
and
dictionary(string(), otherType)
to replace stringIndex
.Changelog
6.1.1