sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7k stars 434 forks source link

Fixed typings to be compatible with express #1713

Closed ehrencrona closed 3 years ago

ehrencrona commented 3 years ago

A more conservative version of #1710 that fixes #1706.

There seem to be three issues with the request:

This seems to compile with both Polka and Express when I tested it

ehrencrona commented 3 years ago

Come to think of it, #1710 is the better solution. I vaguely remember that the request interfaces were different between Polka and Express, which is the only reason there should be a SapperRequest in the first place. If the Express typings work (either that has changed or I was wrong), then it's better to just use them directly.

benmccann commented 3 years ago

I actually like yours better. I'll reopen this until we figure out which one to merge

dummdidumm commented 3 years ago

I like this one better as well, but take this opinion with a grain of salt as I don't know much of Sapper's typings. What I like more about this is that this one is more self-contained.