Skip to content

Commit 2189933

Browse files
committed
[fix] small ts fixes
1 parent ca4f042 commit 2189933

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/lib/Route.svelte.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import type { Component } from 'svelte';
1+
import type { Component, Snippet } from 'svelte';
22

33
export interface RouteProps {
44
path?: string;
55
component?: Component;
6+
children?: Snippet<[{ params: Record<string, string> }]>;
67
}
78

89
declare const Route: Component<RouteProps>;

src/lib/Router.svelte.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Component } from 'svelte';
1+
import type { Component, Snippet } from 'svelte';
22

33
export interface RouteInfo {
44
path: string;
@@ -17,6 +17,7 @@ export type NavigationGuard = (context: {
1717
export interface RouterProps {
1818
url?: string;
1919
beforeEach?: NavigationGuard[];
20+
children?: Snippet;
2021
}
2122

2223
declare const Router: Component<RouterProps>;

0 commit comments

Comments
 (0)