-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running TS Schema Generator in a Browser #2182
Comments
That's awesome! I'd love to merge a PR adding this bit of information to our README, wanna do it? :) |
Instead of adding this to the readme, could we change the package to work in the browser (and test it)? |
That's what I was looking for, seems easy changes but I don't know how could I test and ensure this keeps node-free. Any ideas? |
Vitest can easily run in the browser for example. I just moved Vega-Lite to it in a pull request. |
Was thinking the same, any solutions to it running slower here? |
Maybe jest has some something similar? Maybe vitest has caught up in v3? Or we just accept the slower test times (and report it to hope they fix it). |
Not an issue, but a set of instructions for folks interested (and maybe the maintainers are interested in supporting this natively)
You can see my WIP playground (for something else) which uses ts-json-schema-generator to do "TS type docs" - https://orta.io/angular-expressions-playground/
Here's the key blockers:
process
in a few placesglob
dependency has requirements on running with an FScreateGenerator
) does not provide an API for a custom VFS version of TypeScriptHow I fixed them:
process
yarn patch
to remove glob, andprocess.cwd()
Create the schema generator manually:
Then folks can write typescript types and as they type see what the schema looks like. Thanks for the great library, just trying to give back a little
The text was updated successfully, but these errors were encountered: