tsguard.macro - Typescript type guard macro
Babel macro that automatically generates type guards for a given type (very much WIP). You'll need to install generic-type-guards
for this to work.
Roadmap
- Implement tests
- Support type references (e.g.
typeGuard<IProps>
) - Support tuples
- Support mapped types
- Support rest operator
- Support index accessed types
Usage
; ; if typeGuardunsafeValue