When using preact-router with TypeScript (and strict settings) you had to explicitly type the function passed as a child to the Match component like this:
This PR overrides the type of the children property of the Match component to provide the required types. You can now use the component as intended, even in strict mode:
When using
preact-router
with TypeScript (and strict settings) you had to explicitly type the function passed as a child to the Match component like this:This PR overrides the type of the children property of the Match component to provide the required types. You can now use the component as intended, even in strict mode:
I also removed unused imports in
match/index.d.ts
andtest/match.tsx
.