ts-runtime-checks icon indicating copy to clipboard operation
ts-runtime-checks copied to clipboard

Make by default all type asserted to avoid passing Assert<> everywhere

Open acemtp opened this issue 1 year ago • 1 comments

We really love what you've done.

We try to pimp a lot MeteorJS using full TS and use your package to runtime check all the part that come from the client that cannot be trusted.

But in the end, we love to keep the code simple and small and we would like to be able to check everything every time and only disable it with NoAssert<> or something like that in the very rare case we need optimisation.

The other benefit is that dev cannot forget to add Assert because we prefer checking too much things than forgetting to check onething that can become a hack.

function validate(user: User)

will add the assert for User.

acemtp avatar Jul 24 '24 14:07 acemtp

Hi! I think this is a great idea, I'll implement it in the next version!

GoogleFeud avatar Jul 25 '24 18:07 GoogleFeud