-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Skip importing export types in TS #4754
Conversation
Hi @drewatk! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very sensible! Just one tiny nit
compiler/crates/relay-compiler/src/build_project/artifact_generated_types.rs
Outdated
Show resolved
Hide resolved
compiler/crates/relay-compiler/src/build_project/artifact_generated_types.rs
Outdated
Show resolved
Hide resolved
Looks good! Happy to import/merge once the CLA is signed. |
@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Can this be merged @captbaritone ? |
This pull request has been merged in 0f49c2e. |
@drewatk Thanks for the ping. Merged. We are still working on some issues with our CI which means we are not currently cutting our |
@drewatk We should really consider adding some tests for the TS typings that get emitted. |
A fix for a typescript generation bug discovered from the work in #4753, with efforts to enable checking for all TS generated files #4745
This fixes a class of Typescript errors in generated typescript files with TS checking enabled:
The root cause is the exported type is both not exported by the TS types, and not used due to typescript using the
export default
syntax.Where flow would generate the following export:
Typescript would generate the following, not using the
Mutation
type:This fix removes the extraneous import type when the language is set as typescript.