native-document 1.0.293 → 1.0.294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/router/Router.js +1 -1
- package/types/router.d.ts +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-document",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.294",
|
|
4
4
|
"description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
|
|
5
5
|
"author": "AfroCodeur <https://github.com/afrocodeur>",
|
|
6
6
|
"license": "MIT",
|
package/src/router/Router.js
CHANGED
|
@@ -295,7 +295,7 @@ Router.push = function(target, name = null) {
|
|
|
295
295
|
return Router.get(name).push(target);
|
|
296
296
|
};
|
|
297
297
|
|
|
298
|
-
Router.
|
|
298
|
+
Router.pushTo = function(routeName, params = {}, routerName = null) {
|
|
299
299
|
return Router.get(routerName).push({ name: routeName, params });
|
|
300
300
|
};
|
|
301
301
|
|
package/types/router.d.ts
CHANGED
|
@@ -69,15 +69,15 @@ export interface Router {
|
|
|
69
69
|
mount(container: string | HTMLElement): HTMLElement;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export
|
|
73
|
-
create(options: { mode: 'memory' | 'history' | 'hash'; name?: string; entry?: string }, callback: (router: Router) => void): Router;
|
|
74
|
-
get(name?: string): Router;
|
|
75
|
-
push(target: string | { name: string; params?: RouteParams; query?: QueryParams }, name?: string): void;
|
|
76
|
-
pushTo(routeName: string, params?: RouteParams, routerName?: string): void;
|
|
77
|
-
replace(target: string | { name: string; params?: RouteParams; query?: QueryParams }, name?: string): void;
|
|
78
|
-
replaceTo(routeName: string, params?: RouteParams, routerName?: string): void;
|
|
79
|
-
forward(name?: string): void;
|
|
80
|
-
back(name?: string): void;
|
|
72
|
+
export declare namespace Router {
|
|
73
|
+
function create(options: { mode: 'memory' | 'history' | 'hash'; name?: string; entry?: string }, callback: (router: Router) => void): Router;
|
|
74
|
+
function get(name?: string): Router;
|
|
75
|
+
function push(target: string | { name: string; params?: RouteParams; query?: QueryParams }, name?: string): void;
|
|
76
|
+
function pushTo(routeName: string, params?: RouteParams, routerName?: string): void;
|
|
77
|
+
function replace(target: string | { name: string; params?: RouteParams; query?: QueryParams }, name?: string): void;
|
|
78
|
+
function replaceTo(routeName: string, params?: RouteParams, routerName?: string): void;
|
|
79
|
+
function forward(name?: string): void;
|
|
80
|
+
function back(name?: string): void;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// Link component for router
|