koa-ts-core 0.2.0 → 0.2.2
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/README.md +1 -0
- package/dist/decorate/router_decorate.d.ts +7 -9
- package/dist/index.cjs.js +8 -8
- package/dist/index.esm.js +8 -8
- package/dist/init/register_controller.d.ts +5 -3
- package/dist/init/register_env.d.ts +10 -1
- package/dist/init/register_route.d.ts +2 -2
- package/dist/init/render_doc.d.ts +6 -0
- package/dist/types/route.d.ts +1 -2
- package/dist/utils/funtions.d.ts +1 -0
- package/dist/utils/path.d.ts +11 -29
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -2,15 +2,13 @@ import { HttpMethod } from '../types/route';
|
|
|
2
2
|
export declare const INDEX_ROUTE = "index";
|
|
3
3
|
/**
|
|
4
4
|
* 注册路由
|
|
5
|
-
* @param method
|
|
6
|
-
* @param path
|
|
7
|
-
* @returns
|
|
5
|
+
* @param method HTTP 请求方法
|
|
6
|
+
* @param path 路由地址,可选,默认根据函数名推断
|
|
8
7
|
*/
|
|
9
|
-
export declare function Router(method?: HttpMethod, path?: string): (target: any, functionName: string, descriptor: PropertyDescriptor) =>
|
|
8
|
+
export declare function Router(method?: HttpMethod, path?: string): (target: any, functionName: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param method
|
|
13
|
-
* @param path
|
|
14
|
-
* @returns
|
|
10
|
+
* 注册「需要鉴权」的路由
|
|
11
|
+
* @param method HTTP 请求方法
|
|
12
|
+
* @param path 路由地址,可选,默认根据函数名推断
|
|
15
13
|
*/
|
|
16
|
-
export declare function AuthRouter(method?: HttpMethod, path?: string): (target: any, functionName: string, descriptor: PropertyDescriptor) =>
|
|
14
|
+
export declare function AuthRouter(method?: HttpMethod, path?: string): (target: any, functionName: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|