Subsequent property declarations must have the same type. Property 'path' must be of type 'string | undefined', but here has type 'AllPath | undefined'.
Supporting Information
Please provide other information which led to this error, and any specific questions you have about it:
I try to overwrite the path prop of the <Route /> component of react-router-dom to make it type safe. Normally, it's only a string. but this is not so nice as DX. I tried this approach, but this results in the error message above.
Error Text
Subsequent property declarations must have the same type. Property 'path' must be of type 'string | undefined', but here has type 'AllPath | undefined'.
Supporting Information
Please provide other information which led to this error, and any specific questions you have about it:
I try to overwrite the
path
prop of the<Route />
component ofreact-router-dom
to make it type safe. Normally, it's only a string. but this is not so nice as DX. I tried this approach, but this results in the error message above.