Open atk opened 2 weeks ago
Using a RouteLoadFunc, the component is always expected to be a Component<RouterSectionProps<unknown>>; the inferral of the RouterSectionProps generic T seems to fail.
Component<RouterSectionProps<unknown>>
https://playground.solidjs.com/anonymous/9cbd974a-0126-4c72-9019-f87ac703f263
Create a route:
{ path: "/", component: lazy(import("./ComponentUsingLoadFunc")), // typed as Component<RouterSectionProps<{ x: string, y: string }>>, expected: Component<RouterSectionProps<unknown>> load: loadFunc // () => { x: string, y: string } }
Or copy the playground into your editor and install the actual dependencies so that TS works.
I expect the type of a load function to be inferred correctly.
No response
Describe the bug
Using a RouteLoadFunc, the component is always expected to be a
Component<RouterSectionProps<unknown>>
; the inferral of the RouterSectionProps generic T seems to fail.Your Example Website or App
https://playground.solidjs.com/anonymous/9cbd974a-0126-4c72-9019-f87ac703f263
Steps to Reproduce the Bug or Issue
Create a route:
Or copy the playground into your editor and install the actual dependencies so that TS works.
Expected behavior
I expect the type of a load function to be inferred correctly.
Screenshots or Videos
No response
Platform
Additional context
No response