-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Enable allowJs
with isolatedDeclarations
#58262
Comments
@weswigham can you please assign the task to me, would share a PR! |
Probably not the same issue, but I get an error even if I inherit |
This also fixes most of the issues for passing --isolatedDeclarations except for dotansimha/graphql-code-generator#10160 and microsoft/TypeScript#58262.
Is there a reason not to always allow |
At the implementation level, Theoretically it could be implemented such that |
Here is a use case for |
Acknowledgement
Comment
Today, an error is issued when
allowJs
is set alongsideisolatedDeclarations
- js and ts.d.ts
emit use the same pipeline, so it really should work, provided the error generation logic isn't making too many syntax assumptions.Mostly, unlocking this is going to involve looking through the
isolatedDeclarations
tests and copying them with their cast/annotation syntaxes swapped to jsdoc and filenames swapped to.js
just to give confidence things are going to work OK (and thatgetEffectiveTypeNode
is being used over a direct.type
get in enough places in the error generator). There's a few other JS-specific error cases to look at (js's unique export/expression merges, for one) that may need some new errors, but the bulk of it is just ensuring the existing type node presence checking logic generalizes to jsdoc-sourced type nodes.The text was updated successfully, but these errors were encountered: