-
Notifications
You must be signed in to change notification settings - Fork 22
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
TypeScript Support #2
Comments
Ha, interesting — the code generation is one of the things I plan to change! It's using astring at the moment, which is excellent, but there are a few things I'd like to do slightly differently in the name of readability (collapsing objects and arrays onto a single line where appropriate, adding newline padding around multiline statements, enforcing shorthand/method properties where possible, etc). Anyway, that's by the by. For TS, what I was imagining was that we'd generate a |
For TS, what I was imagining was that we'd generate a .d.ts file
separately, rather than including type annotations in the generated code.
Well yes, but no matter if you want to generate .ts or separate .js/.d.ts
files, it would be nice to generate those with a nice AST based DSL 😊
that's what I'm proposing
|
Why not just use the TS compiler API to generate code instead of estree? |
…-svelte make Scope methods the same as svelte's
So this will be used for the codegen in svelte soon, and the generated code quality looks promising :-)
I am having a look at https://graphql-code-generator.com/ which primarily outputs TS code and the codegen code itself looks quite horrible. My own https://github.com/eversport/intl-codegen outputting both JS and TS separately also is not that pretty.
So anyway, what I wanted to ask is: Is TS support possible with the architecture? Is it planned? Would be really awesome if I could use the same convenience to generate type annotations, and
interface
declarations, etc…The text was updated successfully, but these errors were encountered: