While I understand that if you don't have the url, you can't properly redirect, this means that using the Cookies type (from event.cookies of course) does not work in the form redirect({hello: 'world'}, event.cookies).
The potential solution would simply to remove the | Cookies from the definition of the 2 args redirect function's arguments type, otherwise I'm not too sure where you'll take the current location from x)
The definition of the redirect with two parameters is as follows : https://github.com/ciscoheat/sveltekit-flash-message/blob/16c68906b9abc435d6d3fccff8fd08cfc928d1aa/src/lib/server.ts#L101-L104
But the implementation only takes in a
RequestEvent
(as RequestEvent
, line 148) :https://github.com/ciscoheat/sveltekit-flash-message/blob/16c68906b9abc435d6d3fccff8fd08cfc928d1aa/src/lib/server.ts#L143-L150
While I understand that if you don't have the url, you can't properly redirect, this means that using the
Cookies
type (fromevent.cookies
of course) does not work in the formredirect({hello: 'world'}, event.cookies)
.The potential solution would simply to remove the
| Cookies
from the definition of the 2 argsredirect
function's arguments type, otherwise I'm not too sure where you'll take the current location from x)