axios-annotations 2.1.1 → 2.2.0
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/LICENSE +21 -21
- package/README.md +944 -944
- package/lib/core/expect.d.ts +4 -4
- package/lib/core/expect.js +15 -15
- package/lib/core/service.d.ts +2 -2
- package/lib/decorator/delete-mapping.d.ts +1 -1
- package/lib/decorator/get-mapping.d.ts +1 -1
- package/lib/decorator/patch-mapping.d.ts +1 -1
- package/lib/decorator/post-mapping.d.ts +1 -1
- package/lib/decorator/put-mapping.d.ts +1 -1
- package/lib/decorator/request-mapping.d.ts +1 -1
- package/package.json +16 -16
package/lib/core/expect.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {AxiosPromise} from "axios";
|
|
2
|
-
|
|
3
|
-
export default function Expect<T, D = AxiosPromise<T>>(params: any): D;
|
|
4
|
-
export {};
|
|
1
|
+
import type {AxiosPromise} from "axios";
|
|
2
|
+
|
|
3
|
+
export default function Expect<T, D = AxiosPromise<T>>(params: any): D;
|
|
4
|
+
export {};
|
package/lib/core/expect.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
exports["default"] = Expect;
|
|
6
|
-
/**
|
|
7
|
-
* 警告 Warning: <br/>
|
|
8
|
-
* 仅用于仿冒使用装饰器的方法返回值,绕过IDE/Typescript的类型检查,获得代码提示功能。<br/>
|
|
9
|
-
*
|
|
10
|
-
* Only used to ensure the return value of a method that uses decorators,
|
|
11
|
-
* bypassing IDE/Typescript type checking and obtaining code intelligence.
|
|
12
|
-
*/
|
|
13
|
-
function Expect(params) {
|
|
14
|
-
return params;
|
|
15
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports["default"] = Expect;
|
|
6
|
+
/**
|
|
7
|
+
* 警告 Warning: <br/>
|
|
8
|
+
* 仅用于仿冒使用装饰器的方法返回值,绕过IDE/Typescript的类型检查,获得代码提示功能。<br/>
|
|
9
|
+
*
|
|
10
|
+
* Only used to ensure the return value of a method that uses decorators,
|
|
11
|
+
* bypassing IDE/Typescript type checking and obtaining code intelligence.
|
|
12
|
+
*/
|
|
13
|
+
function Expect(params) {
|
|
14
|
+
return params;
|
|
15
|
+
}
|
package/lib/core/service.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export default class Service {
|
|
|
35
35
|
_for: Record<string, string>;
|
|
36
36
|
_features: Record<string, QueryStringEncodeFeatures>;
|
|
37
37
|
constructor(path?: any);
|
|
38
|
-
get config(): Config
|
|
39
|
-
set config(value: Config);
|
|
38
|
+
get config(): Config<import("axios").AxiosStatic, import("axios").AxiosInstance>;
|
|
39
|
+
set config(value: Config<import("axios").AxiosStatic, import("axios").AxiosInstance>);
|
|
40
40
|
get path(): string;
|
|
41
41
|
set path(value: string);
|
|
42
42
|
params(id: string, name: string, config?: RequestParamEncodeRule): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function DeleteMapping(path?: string): MethodDecorator;
|
|
1
|
+
export default function DeleteMapping<M = undefined>(path?: string): MethodDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function GetMapping(path?: string): MethodDecorator;
|
|
1
|
+
export default function GetMapping<M = undefined>(path?: string): MethodDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function PatchMapping(path?: string): MethodDecorator;
|
|
1
|
+
export default function PatchMapping<M = undefined>(path?: string): MethodDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function PostMapping(path?: string): MethodDecorator;
|
|
1
|
+
export default function PostMapping<M = undefined>(path?: string): MethodDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function PutMapping(path?: string): MethodDecorator;
|
|
1
|
+
export default function PutMapping<M = undefined>(path?: string): MethodDecorator;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
type DecoratorTargetType<M> = M extends string ? MethodDecorator : ClassDecorator;
|
|
2
|
-
export default function RequestMapping<M = undefined>(path: string, method?: M): DecoratorTargetType<M>;
|
|
2
|
+
export default function RequestMapping<M = undefined>(path: string, method?: M | string): DecoratorTargetType<M>;
|
|
3
3
|
export {};
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "axios-annotations",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "HTTP client library uses Axios without Typescript.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"miniprogram": "lib",
|
|
7
|
-
"miniprogramRoot": "lib",
|
|
8
|
-
"keywords": [
|
|
9
|
-
"axios",
|
|
10
|
-
"axios-annotations",
|
|
11
|
-
"axios-decorators"
|
|
12
|
-
],
|
|
13
|
-
"author": "sitorhy",
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"homepage": "https://github.com/sitorhy/axios-annotations#readme"
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "axios-annotations",
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"description": "HTTP client library uses Axios without Typescript.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"miniprogram": "lib",
|
|
7
|
+
"miniprogramRoot": "lib",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"axios",
|
|
10
|
+
"axios-annotations",
|
|
11
|
+
"axios-decorators"
|
|
12
|
+
],
|
|
13
|
+
"author": "sitorhy",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://github.com/sitorhy/axios-annotations#readme"
|
|
16
|
+
}
|