Open hirasso opened 7 months ago
I'd expect from and to to accept any value compatible to path-to-regexp:
from
to
string
string[]
RegExp
Only string is accepted, otherwise TypeScript complains
Solution
Use the type Path exported by swup for the types.
Path
swup
current versions
No response
n/a
What did you expect? ð§
I'd expect
from
andto
to accept any value compatible to path-to-regexp:string
string[]
RegExp
What actually happened? ðµâð«
Only
string
is accepted, otherwise TypeScript complainsSolution
Use the type
Path
exported byswup
for the types.Swup and plugin versions ð
current versions
What browsers are you seeing the problem on? ð§
No response
Relevant log output ð€
No response
URL to minimal reproduction ð
n/a
Checked all these? ð