This PR modifies the type definitions to Router and Link in order to better represent their actual implmentations.
The type definitions for the Link component in preact-router and preact-router/match have some ambiguity between each other, which causes problems like #379. The base Link type definition is now more restricted to make clear that activeClassName can only be applied to the match variant.
onClick is also now omitted as a link prop in order to ensure that the onClick handler used by preact-router is not overriden.
The matchLink variant can also now take in extra props of activeClass and path.
This PR modifies the type definitions to
Router
andLink
in order to better represent their actual implmentations.The type definitions for the
Link
component inpreact-router
andpreact-router/match
have some ambiguity between each other, which causes problems like #379. The baseLink
type definition is now more restricted to make clear thatactiveClassName
can only be applied to thematch
variant.onClick
is also now omitted as a link prop in order to ensure that theonClick
handler used bypreact-router
is not overriden.The
match
Link
variant can also now take in extra props ofactiveClass
andpath
.