Skip to content

Conversation

@jamonholmgren
Copy link
Contributor

In the release notes for noUnusedParameters, there's a note about prefixing the parameter name with an underscore to bypass this error.

This PR adds that same note and example to the noUnusedParameters documentation.

(thanks to @lindboe for noticing this and pointing me to the release docs!)

@jakebailey jakebailey added the deploy-preview Enables automatic deployments to preview environments on a PR label Aug 8, 2024
Parameters declaration with names starting with an underscore _ are exempt from the unused parameter checking. e.g.:

```ts twoslash
function returnNull(_a) {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@jakebailey jakebailey Aug 8, 2024

Choose a reason for hiding this comment

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

Also, set // @noUnusedParameters here. Best to copy the above example and just rename the parameter, actually (but without the @errors)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do!

Copy first example, modify for the example
@jamonholmgren
Copy link
Contributor Author

Finally got back to this. @jakebailey thanks for the feedback, should be ready to go...hopefully!

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-plant-05c166c10-3178.centralus.5.azurestaticapps.net

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

Minor nit, given _ is special in markdown.

@jakebailey jakebailey removed the deploy-preview Enables automatic deployments to preview environments on a PR label May 17, 2025
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
@jamonholmgren
Copy link
Contributor Author

Just remembered this issue and committed that change, @jakebailey. Anything else?

@jakebailey jakebailey enabled auto-merge (squash) July 24, 2025 18:30
@jakebailey jakebailey merged commit 0640deb into microsoft:v2 Jul 24, 2025
8 checks passed
@jamonholmgren jamonholmgren deleted the patch-1 branch July 24, 2025 19:00
@jamonholmgren
Copy link
Contributor Author

Thank you!!

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