Skip to content

Conversation

@Fdawgs
Copy link
Member

@Fdawgs Fdawgs commented Nov 27, 2025

This PR adds JSDoc blocks to all functions to improve static analysis. We had some success with this in fastify/secure-json-parse#154 so seeing if it shakes anything out in other repos.

Checklist

@Fdawgs Fdawgs requested a review from Copilot November 27, 2025 10:08
Copilot finished reviewing on behalf of Fdawgs November 27, 2025 10:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds JSDoc type annotations to improve static analysis capabilities across the codebase, including @this annotations for context-dependent functions and @type annotations for better type inference.

  • Adds JSDoc type annotations to main plugin functions in index.js
  • Adds TypeScript type hints to test functions using TestContext from node:test

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
index.js Adds @this annotations for acceptsMethod and replyAcceptMethod, and @type annotation for the main fastifyAccepts function
test/index.test.js Adds TestContext typedef and inline type annotations to test callback parameters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@Fdawgs Fdawgs merged commit e09b5f5 into main Nov 28, 2025
23 checks passed
@Fdawgs Fdawgs deleted the chore/types branch November 28, 2025 10:14
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