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

v0.7.0 rewrite

Open GoogleFeud opened this issue 1 year ago • 1 comments

This project will re-written (again!) to support even more features and to make the code cleaner.

Here are some features that I'll be trying out after the rewrite is complete:

  • Error customization system
  • More strict custom checks - so you can prohibit a check from getting applied to types it's not supposed to work with
  • Experiment with loop unrolling optimizations
  • Allow for customizing object/tuple field weights so some fields get checked before others (prioritizing checks which fail more often first)
  • Generate different code on different platforms - we've noticed code generated by ts-runtime-checks can be a little slower than alternative AOT libraries when running on specific CPUs and javascript runtimes (ts-runtime checks can be 8x faster than other libraries on bun than it is on node.js, node.js + AMD CPUs run ts-runtime-checks code a little slower), so it'd be nice to generate the fastest possible code for different platforms.

Have any suggestions? Post them here!

GoogleFeud avatar Jun 08 '24 18:06 GoogleFeud

Is it possible to strip markers from the emitted .d.ts files? Right now this repo recommends installing this as a dev dependency, but in the context of writing a library, this isn't possible because the type definition files still reference a module that won't be installed if a consumer of the library installs the package. This ends up with anything using markers becoming any-typed.

image

kade-robertson avatar Dec 03 '24 17:12 kade-robertson