1- import { lazy } from 'solid-js' ;
2- import { RouteDefinition , Navigate } from '@solidjs/router' ;
1+ import { Component , lazy } from 'solid-js' ;
2+ import { RouteDefinition , Navigate , RouteSectionProps } from '@solidjs/router' ;
33import { ContributorsData } from './pages/Contributors.data' ;
44import { BenchmarkData } from './pages/Benchmarks.data' ;
55import { DocsData } from './pages/Docs.data' ;
@@ -15,14 +15,14 @@ import { BlogArticleData } from './pages/BlogArticle.data';
1515export const routes : RouteDefinition [ ] = [
1616 {
1717 path : '/' ,
18- component : lazy ( ( ) => import ( './pages/Home' ) ) ,
18+ component : lazy ( ( ) => import ( './pages/Home' ) ) as Component < RouteSectionProps > ,
1919 load : ( ) => ( {
2020 benchmarks : BenchmarkData ( ) ,
2121 } ) ,
2222 } ,
2323 {
2424 path : '/guides/:id' ,
25- component : lazy ( ( ) => import ( './pages/Docs' ) ) ,
25+ component : lazy ( ( ) => import ( './pages/Docs' ) ) as Component < RouteSectionProps > ,
2626 load : GuideData ,
2727 } ,
2828 {
@@ -44,32 +44,32 @@ export const routes: RouteDefinition[] = [
4444 } ,
4545 {
4646 path : '/blog/:slug' ,
47- component : lazy ( ( ) => import ( './pages/BlogArticle' ) ) ,
47+ component : lazy ( ( ) => import ( './pages/BlogArticle' ) ) as Component < RouteSectionProps > ,
4848 load : BlogArticleData ,
4949 } ,
5050 {
5151 path : '/blog' ,
52- component : lazy ( ( ) => import ( './pages/Blog' ) ) ,
52+ component : lazy ( ( ) => import ( './pages/Blog' ) ) as Component < RouteSectionProps > ,
5353 load : BlogData ,
5454 } ,
5555 {
5656 path : '/docs' ,
57- component : lazy ( ( ) => import ( './pages/Docs' ) ) ,
57+ component : lazy ( ( ) => import ( './pages/Docs' ) ) as Component < RouteSectionProps > ,
5858 children : [
5959 {
6060 path : '/:version' ,
61- component : lazy ( ( ) => import ( './pages/Docs' ) ) ,
61+ component : lazy ( ( ) => import ( './pages/Docs' ) ) as Component < RouteSectionProps > ,
6262 } ,
6363 {
6464 path : '/*all' ,
65- component : lazy ( ( ) => import ( './pages/Docs' ) ) ,
65+ component : lazy ( ( ) => import ( './pages/Docs' ) ) as Component < RouteSectionProps > ,
6666 } ,
6767 ] ,
6868 load : DocsData ,
6969 } ,
7070 {
7171 path : '/tutorial/:id' ,
72- component : lazy ( ( ) => import ( './pages/Tutorial' ) ) ,
72+ component : lazy ( ( ) => import ( './pages/Tutorial' ) ) as Component < RouteSectionProps > ,
7373 load : TutorialData ,
7474 } ,
7575 {
@@ -79,7 +79,7 @@ export const routes: RouteDefinition[] = [
7979
8080 {
8181 path : '/examples/:id' ,
82- component : lazy ( ( ) => import ( './pages/Examples' ) ) ,
82+ component : lazy ( ( ) => import ( './pages/Examples' ) ) as Component < RouteSectionProps > ,
8383 load : ExamplesData ,
8484 } ,
8585 {
@@ -88,17 +88,17 @@ export const routes: RouteDefinition[] = [
8888 } ,
8989 {
9090 path : '/contributors' ,
91- component : lazy ( ( ) => import ( './pages/Contributors' ) ) ,
91+ component : lazy ( ( ) => import ( './pages/Contributors' ) ) as Component < RouteSectionProps > ,
9292 load : ContributorsData ,
9393 } ,
9494 {
9595 path : '/ecosystem' ,
96- component : lazy ( ( ) => import ( './pages/Packages' ) ) ,
96+ component : lazy ( ( ) => import ( './pages/Packages' ) ) as Component < RouteSectionProps > ,
9797 load : PackagesData ,
9898 } ,
9999 {
100100 path : '/resources' ,
101- component : lazy ( ( ) => import ( './pages/Resources' ) ) ,
101+ component : lazy ( ( ) => import ( './pages/Resources' ) ) as Component < RouteSectionProps > ,
102102 load : ResourcesData ,
103103 } ,
104104 {
@@ -107,7 +107,7 @@ export const routes: RouteDefinition[] = [
107107 } ,
108108 {
109109 path : '/store' ,
110- component : lazy ( ( ) => import ( './pages/Store' ) ) ,
110+ component : lazy ( ( ) => import ( './pages/Store' ) ) as Component < RouteSectionProps > ,
111111 load : StoreData ,
112112 } ,
113113 {
0 commit comments