Skip to content

🧩 Tidy up types for Express #364

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

Merged
merged 6 commits into from
Apr 23, 2025
Merged

Conversation

StewEucen
Copy link
Contributor

@StewEucen StewEucen self-assigned this Apr 23, 2025
@StewEucen StewEucen marked this pull request as ready for review April 23, 2025 13:40
Copy link

@Copilot 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 pull request cleans up type annotations for Express by replacing inline import types with a unified ExpressType alias.

  • Removed unused JSDoc typedef for ExpressRequest in test stub
  • Updated Express type annotations in test files and production code to use ExpressType alias

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/stubs/StubExpressRequest.js Removed the inline typedef for ExpressRequest
tests/tests/server/restfulapi/RestfulApiRoutesBuilder.js Updated type annotations for NextFunction and Request to use ExpressType
lib/server/restfulapi/RestfulApiRoutesBuilder.js Updated type annotation for expressResponse to use ExpressType
Comments suppressed due to low confidence (2)

lib/server/restfulapi/RestfulApiRoutesBuilder.js:377

  • Ensure that the ExpressType alias is properly imported or declared in the module so that this type reference resolves correctly.
*   expressResponse: ExpressType.Response

tests/tests/server/restfulapi/RestfulApiRoutesBuilder.js:610

  • Confirm that the ExpressType alias is available in this test module or import it as needed to avoid potential type resolution issues.
/** @type {ExpressType.NextFunction} */

Copy link

@arbredoux arbredoux left a comment

Choose a reason for hiding this comment

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

@StewEucen StewEucen merged commit 4114c67 into release/2.6.0 Apr 23, 2025
2 checks passed
@StewEucen StewEucen deleted the tidyup/types-for-Express branch April 23, 2025 13:56
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