I've not tried it, but here's a thing that would generate typeguards from TS definitions, instead of you having to write them;
I've not tried it, but here's a thing that would generate typeguards from TS definitions, instead of you having to write them;