Skip to content

Commit

Permalink
fix typeof SvelteComponent (sveltejs/svelte#8512)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangfengming committed Jun 27, 2023
1 parent 84dea79 commit 9b436f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/jiangfengming/svelte-pilot/issues"
},
"peerDependencies": {
"svelte": ">=3 <5"
"svelte": "^4"
},
"dependencies": {
"cast-string": "^0.6.4",
Expand All @@ -33,8 +33,8 @@
},
"devDependencies": {
"@types/lodash-es": "^4.17.7",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "^8.43.0",
"eslint-config-unambiguous": "^0.7.1",
"eslint-plugin-svelte": "^2.31.1",
Expand Down
6 changes: 4 additions & 2 deletions src/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import { StringCaster } from 'cast-string';
export type PrimitiveType = string | number | boolean | null | undefined;

export type ComponentModule = {
default: typeof SvelteComponent;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
default: typeof SvelteComponent<any>;
load?: LoadFn;
beforeEnter?: GuardHook;
};

export type SyncComponent = ComponentModule | typeof SvelteComponent;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type SyncComponent = ComponentModule | typeof SvelteComponent<any>;
export type AsyncComponent = () => Promise<SyncComponent>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type RouteProps = Record<string, any> | ((route: Route) => Record<string, any>);
Expand Down

0 comments on commit 9b436f0

Please sign in to comment.