@kevisual/router 0.0.70 → 0.0.72
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/dist/app.d.ts +5 -0
- package/dist/app.js +19504 -0
- package/dist/opencode.d.ts +5 -2
- package/dist/opencode.js +13381 -14322
- package/dist/router-browser.d.ts +22 -20
- package/dist/router-browser.js +14044 -15137
- package/dist/router-define.d.ts +394 -3
- package/dist/router-define.js +126 -124
- package/dist/router-simple.js +665 -759
- package/dist/router.d.ts +22 -20
- package/dist/router.js +17810 -21180
- package/dist/ws.d.ts +5 -2
- package/dist/ws.js +2980 -150
- package/package.json +19 -54
- package/src/app.ts +2 -2
- package/src/browser.ts +1 -1
- package/src/index.ts +1 -1
- package/src/route.ts +21 -17
- package/src/router-define.ts +1 -1
- package/src/utils/random.ts +8 -0
package/dist/ws.d.ts
CHANGED
|
@@ -79,6 +79,9 @@ type RouteContext<T = {
|
|
|
79
79
|
query?: {
|
|
80
80
|
[key: string]: any;
|
|
81
81
|
};
|
|
82
|
+
args?: {
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
};
|
|
82
85
|
/** return body */
|
|
83
86
|
body?: number | string | Object;
|
|
84
87
|
forward?: (response: {
|
|
@@ -214,7 +217,7 @@ declare class Route<U = {
|
|
|
214
217
|
define<T extends {
|
|
215
218
|
[key: string]: any;
|
|
216
219
|
} = RouterContextT>(path: string, key: string, fn: Run<T & U>): this;
|
|
217
|
-
update(opts: DefineRouteOpts,
|
|
220
|
+
update(opts: DefineRouteOpts, onlyUpdateList?: string[]): this;
|
|
218
221
|
addTo(router: QueryRouter | {
|
|
219
222
|
add: (route: Route) => void;
|
|
220
223
|
[key: string]: any;
|
|
@@ -252,7 +255,7 @@ declare class QueryRouter {
|
|
|
252
255
|
* remove route by id
|
|
253
256
|
* @param uniqueId
|
|
254
257
|
*/
|
|
255
|
-
removeById(
|
|
258
|
+
removeById(uniqueId: string): void;
|
|
256
259
|
/**
|
|
257
260
|
* 执行route
|
|
258
261
|
* @param path
|