typespeed 2.0.22 → 2.0.23

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.
@@ -169,6 +169,21 @@ declare function after(constructorFunction: any, methodName: string): (target: a
169
169
  declare function schedule(cronTime: string | Date): (target: any, propertyKey: string) => void;
170
170
  /**RabbitMQ 监听装饰器,参数是监听的队列名称,当接受到消息时将执行被装饰方法 */
171
171
  declare function rabbitListener(queue: string): (target: any, propertyKey: string) => void;
172
+ /** request 对象装饰器,作为路由页面方法参数,获取 request 对象 */
173
+ declare function req(target: any, propertyKey: string, parameterIndex: number) : void;
174
+ /** response 对象装饰器,作为路由页面方法参数,获取 response 对象 */
175
+ declare function res(target: any, propertyKey: string, parameterIndex: number) : void;
176
+ /** next 函数装饰器,作为路由页面方法参数,获取 next 函数 */
177
+ declare function next(target: any, propertyKey: string, parameterIndex: number) : void;
178
+ /** request.body 对象装饰器,作为路由页面方法参数,获取 request.body 对象 */
179
+ declare function reqBody(target: any, propertyKey: string, parameterIndex: number) : void;
180
+ /** request.param 值装饰器,作为路由页面方法参数,获取 request.params 内容 */
181
+ declare function reqParam(paramName: string) : (target: any, propertyKey: string, parameterIndex: number) => void;
182
+ /** request.query 值装饰器,作为路由页面方法参数,获取 request.query 内容 */
183
+ declare function reqQuery(paramName: string) : (target: any, propertyKey: string, parameterIndex: number) => void;
184
+ /** request 表单值装饰器,作为路由页面方法参数,获取 request.body 表单内容 */
185
+ declare function reqForm(paramName: string) : (target: any, propertyKey: string, parameterIndex: number) => void;
186
+
172
187
  /**框架 Web 服务工厂类 */
173
188
  declare abstract class ServerFactory {
174
189
  /**Web 服务实例 */
@@ -344,4 +359,4 @@ declare class ExpressServer extends ServerFactory {
344
359
  private setDefaultMiddleware;
345
360
  }
346
361
 
347
- export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model};
362
+ export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, next, reqBody, reqQuery, reqForm, reqParam, req, req as request, res, res as response, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typespeed",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "A new Framework for TypeScript.",
5
5
  "author": "speedphp",
6
6
  "license": "MIT License",
@@ -169,6 +169,21 @@ declare function after(constructorFunction: any, methodName: string): (target: a
169
169
  declare function schedule(cronTime: string | Date): (target: any, propertyKey: string) => void;
170
170
  /**RabbitMQ 监听装饰器,参数是监听的队列名称,当接受到消息时将执行被装饰方法 */
171
171
  declare function rabbitListener(queue: string): (target: any, propertyKey: string) => void;
172
+ /** request 对象装饰器,作为路由页面方法参数,获取 request 对象 */
173
+ declare function req(target: any, propertyKey: string, parameterIndex: number) : void;
174
+ /** response 对象装饰器,作为路由页面方法参数,获取 response 对象 */
175
+ declare function res(target: any, propertyKey: string, parameterIndex: number) : void;
176
+ /** next 函数装饰器,作为路由页面方法参数,获取 next 函数 */
177
+ declare function next(target: any, propertyKey: string, parameterIndex: number) : void;
178
+ /** request.body 对象装饰器,作为路由页面方法参数,获取 request.body 对象 */
179
+ declare function reqBody(target: any, propertyKey: string, parameterIndex: number) : void;
180
+ /** request.param 值装饰器,作为路由页面方法参数,获取 request.params 内容 */
181
+ declare function reqParam(paramName: string) : (target: any, propertyKey: string, parameterIndex: number) => void;
182
+ /** request.query 值装饰器,作为路由页面方法参数,获取 request.query 内容 */
183
+ declare function reqQuery(paramName: string) : (target: any, propertyKey: string, parameterIndex: number) => void;
184
+ /** request 表单值装饰器,作为路由页面方法参数,获取 request.body 表单内容 */
185
+ declare function reqForm(paramName: string) : (target: any, propertyKey: string, parameterIndex: number) => void;
186
+
172
187
  /**框架 Web 服务工厂类 */
173
188
  declare abstract class ServerFactory {
174
189
  /**Web 服务实例 */
@@ -344,4 +359,4 @@ declare class ExpressServer extends ServerFactory {
344
359
  private setDefaultMiddleware;
345
360
  }
346
361
 
347
- export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model};
362
+ export { ExpressServer, LogDefault, NodeCache, RabbitMQ, rabbitListener, ReadWriteDb, Redis, CacheFactory, DataSourceFactory, LogFactory, ServerFactory, AuthenticationFactory, next, reqBody, reqQuery, reqForm, reqParam, req, req as request, res, res as response, component, bean, resource, log, app, before, after, value, error, config, autoware, getBean, getComponent, schedule, getMapping, postMapping, requestMapping, setRouter, upload, jwt, insert, update, remove, select, param, resultType, cache, Model};