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 CHANGED
@@ -544,6 +544,7 @@ env
544
544
  常用环境变量:
545
545
 
546
546
  - `process.env.APP_PORT`:服务监听端口
547
+ - `process.env.ENV_DIR`:环境变量目录
547
548
  - 其他自定义业务配置
548
549
 
549
550
  ---
@@ -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) => any;
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) => any;
14
+ export declare function AuthRouter(method?: HttpMethod, path?: string): (target: any, functionName: string, descriptor: PropertyDescriptor) => PropertyDescriptor;