Closed ehrencrona closed 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.
I actually like yours better. I'll reopen this until we figure out which one to merge
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.
A more conservative version of #1710 that fixes #1706.
There seem to be three issues with the request:
search
property that's supposed to hold the query string doesn't actually exist. No idea how it wound up in there. It's also not referenced anywhere in the code so easy to remove.query
can contain a wider range of stuff thanSapperRequest
declares. I grabbed the Express definition but we could also doRecord<string, any>
socket
assumed it was always anhttps
connectionThis seems to compile with both Polka and Express when I tested it