You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using https://github.com/vega/ts-json-schema-generator so I can get named parameters from functions and a json schema for every interface/type. However, I've recently moved to Bun.sh and, on top of the fact that it's always been super slow, it's also super limited now, very buggy.
I was thinking that it would be very useful to make a SWC AST --> JSON Schema parser.
But it also seems quite some work so I'm not sure I'll do it. Especially if you want to support everything.
My naive idea now is to try and understand the AST fully and generate a JSON schema from every type/interface found, including import resolutions.
Is there anyone that has any other thoughts on this? Could be helpful before I get started on this daunting task :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have been using https://github.com/vega/ts-json-schema-generator so I can get named parameters from functions and a json schema for every interface/type. However, I've recently moved to Bun.sh and, on top of the fact that it's always been super slow, it's also super limited now, very buggy.
I was thinking that it would be very useful to make a SWC AST --> JSON Schema parser.
But it also seems quite some work so I'm not sure I'll do it. Especially if you want to support everything.
My naive idea now is to try and understand the AST fully and generate a JSON schema from every type/interface found, including import resolutions.
Is there anyone that has any other thoughts on this? Could be helpful before I get started on this daunting task :)
Beta Was this translation helpful? Give feedback.
All reactions