Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
types: Use explicit return type of
express.Router
on `getMidd… (#3230)
The TypeScript compiler is inferring the return type of this method accurately, but emitting `import("express-serve-static-core")` directly into the `apollo-server-express` type definitions. Looking at the `package-lock.json` for the Apollo Server repository, I have a working theory that there are multple `@types/express`'s within this project and that, when resolving the imports in the delcarations, a copy of `express-serve-static-core` is not quite in the right resolution path — potentially due to some package hoisting and module resolution. To be honest, it's just a theory and I only spent about 3 or 4 minutes looking at this, but I hope that this will address #3222 (intentionally not using the keyword "Fixes" here because we'll wait for validation!)
- Loading branch information