6 ms·
Yes! We have comprehensive integration tests that run in the browser to ensure the generated code only uses browser-compatible APIs. Also, the generated code ne
by stepchowfun 3y ago
Yes! We have comprehensive integration tests that run in the browser to ensure the generated code only uses browser-compatible APIs. Also, the generated code never uses reflection or dynamic code evaluation, so it works in Content Security Policy-restricted environments.
See this section of the README for more info: https://github.com/stepchowfun/typical#javascript-and-typescript https://github.com/stepchowfun/typical#javascript-and-typesc...
- throwaway290 3y agoIt's nice that generated code works in browser but I was curious whether it's possible to actually generate code from .t syntax all in browser. By the looks of it typical is only a CLI tool, so I guess not for now. Maybe unless it is ported to WASM...
- stepchowfun 3y agoA wasm port doesn't seem too farfetched. What's the use case for running the code generator in the browser?
- throwaway290 3y agoSomething that could involve giving the end user some control over schema...