Skip to content
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

Ignore method arguments typechecking in typescript #5095

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

sher
Copy link
Contributor

@sher sher commented Aug 5, 2024

Added a new function to include ts-ignore comment to method shape/prototype.

Currently, generated TypeScript client code contains methods with unused arguments that are never referenced in the body.
This causes TypeScript typecheck to fail in projects where tsconfig.json compiler option noUnusedLocals: true is set.
Example: Vitejs template tsconfig.json

p.s.: not sure what to test here.

@sher sher requested a review from a team as a code owner August 5, 2024 19:34
@sher
Copy link
Contributor Author

sher commented Aug 6, 2024

@baywet
Hi. This PR is similar to the case we handled before #4398
But this time it is suppressing typecheck errors for method arguments. Please, take a look.

Copy link
Member

@andrueastman andrueastman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution here @sher

Any chance you can also add changelog entry for the change as well to the changelog file at the repository root?

@sher
Copy link
Contributor Author

sher commented Aug 6, 2024

@andrueastman
Added a CHANGELOG record 2bbf705

@sher sher requested a review from andrueastman August 6, 2024 09:44
@andrueastman andrueastman enabled auto-merge August 6, 2024 17:16
@andrueastman andrueastman merged commit 3612506 into microsoft:main Aug 6, 2024
208 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants