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

types - polka.use not compatible with express.RequestHandler #173

Closed
benmccann opened this issue Aug 21, 2021 · 2 comments
Closed

types - polka.use not compatible with express.RequestHandler #173

benmccann opened this issue Aug 21, 2021 · 2 comments

Comments

@benmccann
Copy link

polka().use(compression({ threshold: 0 }) gives me a red squiggly in VS Code. You can see it by opening up SvelteKit's packages/adapter-node/src/server.js in VS Code. compression returns a express.RequestHandler.

@lukeed
Copy link
Owner

lukeed commented Aug 21, 2021

The types will never line up. That's okay. Use as Middleware or ts-ignore it.

They're different libraries with different amount of signatures and type hints.

@lukeed lukeed closed this as completed Aug 21, 2021
@benmccann
Copy link
Author

The types lined up with the types from DefinitelyTyped on an older version of Polka, so I thought it should be possible

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

No branches or pull requests

2 participants