File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 13
13
" src/lib"
14
14
],
15
15
"exports" : {
16
+ "types" : " ./src/lib/index.d.ts" ,
16
17
"svelte" : " ./src/lib/index.js" ,
17
18
"import" : " ./dist/svelte-tiny-router.es.js" ,
18
19
"require" : " ./dist/svelte-tiny-router.umd.js"
45
46
"url" : " https://github.com/notnotsamuel/svelte-tiny-router/issues"
46
47
},
47
48
"homepage" : " https://github.com/notnotsamuel/svelte-tiny-router#readme"
48
- }
49
+ }
Original file line number Diff line number Diff line change 1
1
import type { SvelteComponent } from 'svelte' ;
2
- import type { NavigationGuard } from './Router.svelte.d.ts ' ; // Import for beforeEach type
2
+ import type { NavigationGuard } from './Router.svelte' ;
3
3
4
4
export interface RouterContext {
5
5
base : string ; // Base path of the current router instance
@@ -14,6 +14,4 @@ export interface RouterContext {
14
14
getQueryParam : ( key : string ) => string | undefined ;
15
15
hasQueryParam : ( key : string ) => boolean ;
16
16
removeQueryParams : ( keys : string [ ] ) => void ;
17
- }
18
-
19
- export function useTinyRouter ( ) : RouterContext ;
17
+ }
Original file line number Diff line number Diff line change 1
- export { navigate } from './navigate.js' ;
2
- export { useTinyRouter , type RouterContext } from './context.js' ;
3
- export { default as Route , type RouteProps } from './Route.svelte' ;
1
+ import type { RouterContext } from './context' ;
2
+
4
3
export { default as Router , type RouterProps } from './Router.svelte' ;
4
+ export { default as Route , type RouteProps } from './Route.svelte' ;
5
+ export { navigate } from './navigate' ;
6
+
7
+ /**
8
+ * retrieve the router context
9
+ */
10
+ export function useTinyRouter ( ) : RouterContext ;
11
+
12
+ // Export the context type for users
13
+ export type { RouterContext } ;
You can’t perform that action at this time.
0 commit comments