Forbes Lindesay
Forbes Lindesay
This would provide TypeScript style error messages. Most of this should actually be pretty straightforward with the current implementation. Primary description of the idea: https://github.com/pelotom/runtypes/issues/10 - request for multiple errors...
It would be good to have a Runtype for `Enum` that could take an existing TypeScript enum and return a type for validating it. It would also be possible to...
Something like: ```ts function assertType( rt: TRuntypeBase, v: unknown, ): asserts v is Static { (rt as any).assert(v); } ``` Requested in https://github.com/pelotom/runtypes/issues/110 Needed because of microsoft/TypeScript#36931
This is planned for the 2.0.0 release. https://github.com/pelotom/runtypes/issues/160 https://github.com/pelotom/runtypes/issues/143 https://github.com/pelotom/runtypes/issues/79
Most other projects use `Record` to define the same type as `Record`. This would be a very significant breaking change, but better to do it now while the fork is...
This is an alternative to https://github.com/ForbesLindesay/funtypes/issues/30 This could approximate a subset of TypeScript, and allow compiling a collection of files (connected via import statements) into a single TypeScript file (or...
An "Exclude" helper would allow you to take any existing type and exclude certain sub types. e.g. take an existing nullable type and make it not null by doing `.Exclude(Null)`...
Ideally you'd always use a concrete type, or at least fall back to `unknown`, but sometimes being pragmatic requires you to be able to simply mark the parts that don't...
See https://github.com/pelotom/runtypes/issues/77 It's currently completely unused for Funtypes.
https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#variadic-tuple-types means it should now be possible to build a type safe `concat` method that supports mixing Tuple types and Array types. This primitive would also allow proper typed support...