type 定义修改
This commit is contained in:
parent
dc2f282f4b
commit
50c87043c8
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@kevisual/router",
|
||||
"version": "0.0.6-alpha-3",
|
||||
"version": "0.0.6-alpha-4",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
|
@ -61,9 +61,9 @@ export class App<T = {}, U = AppReqRes> {
|
||||
|
||||
Route = Route;
|
||||
route(opts: RouteOpts): Route<U>;
|
||||
route(path: string, key?: string): Route;
|
||||
route(path: string, opts?: RouteOpts): Route;
|
||||
route(path: string, key?: string, opts?: RouteOpts): Route;
|
||||
route(path: string, key?: string): Route<U>;
|
||||
route(path: string, opts?: RouteOpts): Route<U>;
|
||||
route(path: string, key?: string, opts?: RouteOpts): Route<U>;
|
||||
route(...args: any[]) {
|
||||
const [path, key, opts] = args;
|
||||
if (typeof path === 'object') {
|
||||
|
@ -582,10 +582,10 @@ export class QueryRouterServer extends QueryRouter {
|
||||
}
|
||||
|
||||
Route = Route;
|
||||
route(opts: RouteOpts): Route;
|
||||
route(path: string, key?: string): Route;
|
||||
route(path: string, opts?: RouteOpts): Route;
|
||||
route(path: string, key?: string, opts?: RouteOpts): Route;
|
||||
route(opts: RouteOpts): Route<Required<RouteContext>>;
|
||||
route(path: string, key?: string): Route<Required<RouteContext>>;
|
||||
route(path: string, opts?: RouteOpts): Route<Required<RouteContext>>;
|
||||
route(path: string, key?: string, opts?: RouteOpts): Route<Required<RouteContext>>;
|
||||
route(...args: any[]) {
|
||||
const [path, key, opts] = args;
|
||||
if (typeof path === 'object') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user