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

build(deps): update to latest @types/express #455

Merged
merged 1 commit into from
Aug 21, 2020
Merged

Conversation

LoneRifle
Copy link
Contributor

@LoneRifle LoneRifle commented Aug 21, 2020

Problem and Solution

To ensure that we never fall behind in our dependency upkeep, bite the bullet
and rework parts of the codebase to work with the latest type definitions for
express. Take the trouble also to consolidate our convenience method definitions
for the response object

  • Update @types/express to 4.17.7
  • Tighten the definition of our convenience methods for
    express.Response by moving them from our http interface
    to our Express.Response interface
  • Drop definition of response.{send, status, json} as they are
    handled out-of-the-box now
  • Spot the response prototype for express.Response and change our
    convenience method definitions to hang off that instead of
    http.ServerResponse
  • Coax variables into the correct types in controllers to better
    enforce type correctness

- Update to 4.17.7 of @types/express
- Tighten the definition of our convenience methods for
  express.Response by moving them from our http interface
  to our Express.Response interface
- Drop definition of response.{send, status, json} as they are
  handled out-of-the-box now
- Spot the response prototype for express.Response and change our
  convenience method definitions to hang off that instead of
  http.ServerResponse
- Coax variables into the correct types in controllers to better
  enforce type correctness
Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

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

code is lgtm, with just one point of discussion involving type declaration of variables destructured from req

@LoneRifle LoneRifle merged commit cedb46d into develop Aug 21, 2020
@LoneRifle LoneRifle deleted the build/deps/express branch August 21, 2020 08:46
xming13 pushed a commit to xming13/GoGovSG that referenced this pull request Aug 21, 2020
- Update @types/express to 4.17.7 
- Tighten the definition of our convenience methods for
  express.Response by moving them from our http interface
  to our Express.Response interface
- Drop definition of response.{send, status, json} as they are
  handled out-of-the-box now
- Spot the response prototype for express.Response and change our
  convenience method definitions to hang off that instead of
  http.ServerResponse
- Coax variables into the correct types in controllers to better
  enforce type correctness
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