@lsby/net-core 0.3.32 → 0.3.33
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/dist/bin/gen-type/addition.cjs +105 -94
- package/dist/bin/gen-type/addition.d.cts +1 -1
- package/dist/bin/gen-type/bin.cjs +106 -95
- package/dist/bin/gen-type/index.cjs +106 -95
- package/dist/cjs/bin/gen-type/addition.cjs +105 -94
- package/dist/cjs/bin/gen-type/addition.d.cts +1 -1
- package/dist/cjs/bin/gen-type/bin.cjs +106 -95
- package/dist/cjs/bin/gen-type/index.cjs +106 -95
- package/dist/esm/bin/gen-type/addition.d.ts +1 -1
- package/dist/esm/bin/gen-type/addition.js +1 -1
- package/dist/esm/bin/gen-type/bin.js +2 -2
- package/dist/esm/bin/gen-type/index.js +2 -2
- package/dist/esm/{chunk-JWLYOXOP.js → chunk-7RH7Z7VC.js} +2 -2
- package/dist/esm/chunk-OMGVOLYE.js +110 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/plugin/extend/json.js +2 -2
- package/package.json +1 -1
- package/dist/esm/chunk-TW4ZMOLY.js +0 -99
- package/dist/esm/{chunk-7OIWSU4D.js → chunk-AMBUPXY3.js} +3 -3
package/package.json
CHANGED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// src/bin/gen-type/addition.ts
|
|
2
|
-
var \u9644\u52A0\u4EE3\u7801 = [
|
|
3
|
-
"",
|
|
4
|
-
`type \u5143\u7EC4\u8F6C\u8054\u5408<T> = T extends any[] ? T[number] : never`,
|
|
5
|
-
"",
|
|
6
|
-
`type \u6240\u6709\u63A5\u53E3\u8DEF\u5F84\u4EEC<A = InterfaceType> = A extends []`,
|
|
7
|
-
` ? []`,
|
|
8
|
-
` : A extends [infer x, ...infer xs]`,
|
|
9
|
-
` ? 'path' extends keyof x`,
|
|
10
|
-
` ? [x['path'], ...\u6240\u6709\u63A5\u53E3\u8DEF\u5F84\u4EEC<xs>]`,
|
|
11
|
-
` : never`,
|
|
12
|
-
` : never`,
|
|
13
|
-
`type Get\u63A5\u53E3\u8DEF\u5F84\u4EEC<A = InterfaceType> = A extends []`,
|
|
14
|
-
` ? []`,
|
|
15
|
-
` : A extends [infer x, ...infer xs]`,
|
|
16
|
-
` ? 'method' extends keyof x`,
|
|
17
|
-
` ? x['method'] extends 'get'`,
|
|
18
|
-
` ? 'path' extends keyof x`,
|
|
19
|
-
` ? [x['path'], ...\u6240\u6709\u63A5\u53E3\u8DEF\u5F84\u4EEC<xs>]`,
|
|
20
|
-
` : never`,
|
|
21
|
-
` : never`,
|
|
22
|
-
` : never`,
|
|
23
|
-
` : never`,
|
|
24
|
-
`type Post\u63A5\u53E3\u8DEF\u5F84\u4EEC<A = InterfaceType> = A extends []`,
|
|
25
|
-
` ? []`,
|
|
26
|
-
` : A extends [infer x, ...infer xs]`,
|
|
27
|
-
` ? 'method' extends keyof x`,
|
|
28
|
-
` ? x['method'] extends 'post'`,
|
|
29
|
-
` ? 'path' extends keyof x`,
|
|
30
|
-
` ? [x['path'], ...\u6240\u6709\u63A5\u53E3\u8DEF\u5F84\u4EEC<xs>]`,
|
|
31
|
-
` : never`,
|
|
32
|
-
` : never`,
|
|
33
|
-
` : never`,
|
|
34
|
-
` : never`,
|
|
35
|
-
``,
|
|
36
|
-
`type \u4ECE\u8DEF\u5F84\u83B7\u5F97\u53C2\u6570<Path, A = InterfaceType> = A extends []`,
|
|
37
|
-
` ? []`,
|
|
38
|
-
` : A extends [infer x, ...infer xs]`,
|
|
39
|
-
` ? 'path' extends keyof x`,
|
|
40
|
-
` ? x['path'] extends Path`,
|
|
41
|
-
` ? 'input' extends keyof x`,
|
|
42
|
-
` ? x['input']`,
|
|
43
|
-
` : never`,
|
|
44
|
-
` : \u4ECE\u8DEF\u5F84\u83B7\u5F97\u53C2\u6570<Path, xs>`,
|
|
45
|
-
` : never`,
|
|
46
|
-
` : never`,
|
|
47
|
-
`type \u4ECE\u8DEF\u5F84\u83B7\u5F97\u65B9\u6CD5<Path, A = InterfaceType> = A extends []`,
|
|
48
|
-
` ? []`,
|
|
49
|
-
` : A extends [infer x, ...infer xs]`,
|
|
50
|
-
` ? 'path' extends keyof x`,
|
|
51
|
-
` ? x['path'] extends Path`,
|
|
52
|
-
` ? 'method' extends keyof x`,
|
|
53
|
-
` ? x['method']`,
|
|
54
|
-
` : never`,
|
|
55
|
-
` : \u4ECE\u8DEF\u5F84\u83B7\u5F97\u65B9\u6CD5<Path, xs>`,
|
|
56
|
-
` : never`,
|
|
57
|
-
` : never`,
|
|
58
|
-
`type \u4ECE\u8DEF\u5F84\u83B7\u5F97\u6B63\u786E\u8FD4\u56DE<Path, A = InterfaceType> = A extends []`,
|
|
59
|
-
` ? []`,
|
|
60
|
-
` : A extends [infer x, ...infer xs]`,
|
|
61
|
-
` ? 'path' extends keyof x`,
|
|
62
|
-
` ? x['path'] extends Path`,
|
|
63
|
-
` ? 'successOutput' extends keyof x`,
|
|
64
|
-
` ? x['successOutput']`,
|
|
65
|
-
` : never`,
|
|
66
|
-
` : \u4ECE\u8DEF\u5F84\u83B7\u5F97\u6B63\u786E\u8FD4\u56DE<Path, xs>`,
|
|
67
|
-
` : never`,
|
|
68
|
-
` : never`,
|
|
69
|
-
`type \u4ECE\u8DEF\u5F84\u83B7\u5F97\u9519\u8BEF\u8FD4\u56DE<Path, A = InterfaceType> = A extends []`,
|
|
70
|
-
` ? []`,
|
|
71
|
-
` : A extends [infer x, ...infer xs]`,
|
|
72
|
-
` ? 'path' extends keyof x`,
|
|
73
|
-
` ? x['path'] extends Path`,
|
|
74
|
-
` ? 'errorOutput' extends keyof x`,
|
|
75
|
-
` ? x['errorOutput']`,
|
|
76
|
-
` : never`,
|
|
77
|
-
` : \u4ECE\u8DEF\u5F84\u83B7\u5F97\u9519\u8BEF\u8FD4\u56DE<Path, xs>`,
|
|
78
|
-
` : never`,
|
|
79
|
-
` : never`,
|
|
80
|
-
``,
|
|
81
|
-
`export type \u8BF7\u6C42\u540E\u7AEF\u51FD\u6570\u7C7B\u578B = <\u8DEF\u5F84 extends \u5143\u7EC4\u8F6C\u8054\u5408<\u6240\u6709\u63A5\u53E3\u8DEF\u5F84\u4EEC>>(`,
|
|
82
|
-
` \u8DEF\u5F84: \u8DEF\u5F84,`,
|
|
83
|
-
` \u53C2\u6570: \u4ECE\u8DEF\u5F84\u83B7\u5F97\u53C2\u6570<\u8DEF\u5F84>,`,
|
|
84
|
-
` \u65B9\u6CD5: \u4ECE\u8DEF\u5F84\u83B7\u5F97\u65B9\u6CD5<\u8DEF\u5F84>,`,
|
|
85
|
-
`) => Promise<\u4ECE\u8DEF\u5F84\u83B7\u5F97\u6B63\u786E\u8FD4\u56DE<\u8DEF\u5F84> | \u4ECE\u8DEF\u5F84\u83B7\u5F97\u9519\u8BEF\u8FD4\u56DE<\u8DEF\u5F84>>`,
|
|
86
|
-
`export type Get\u8BF7\u6C42\u540E\u7AEF\u51FD\u6570\u7C7B\u578B = <\u8DEF\u5F84 extends \u5143\u7EC4\u8F6C\u8054\u5408<Get\u63A5\u53E3\u8DEF\u5F84\u4EEC>>(`,
|
|
87
|
-
` \u8DEF\u5F84: \u8DEF\u5F84,`,
|
|
88
|
-
` \u53C2\u6570: \u4ECE\u8DEF\u5F84\u83B7\u5F97\u53C2\u6570<\u8DEF\u5F84>,`,
|
|
89
|
-
`) => Promise<\u4ECE\u8DEF\u5F84\u83B7\u5F97\u6B63\u786E\u8FD4\u56DE<\u8DEF\u5F84> | \u4ECE\u8DEF\u5F84\u83B7\u5F97\u9519\u8BEF\u8FD4\u56DE<\u8DEF\u5F84>>`,
|
|
90
|
-
`export type Post\u8BF7\u6C42\u540E\u7AEF\u51FD\u6570\u7C7B\u578B = <\u8DEF\u5F84 extends \u5143\u7EC4\u8F6C\u8054\u5408<Post\u63A5\u53E3\u8DEF\u5F84\u4EEC>>(`,
|
|
91
|
-
` \u8DEF\u5F84: \u8DEF\u5F84,`,
|
|
92
|
-
` \u53C2\u6570: \u4ECE\u8DEF\u5F84\u83B7\u5F97\u53C2\u6570<\u8DEF\u5F84>,`,
|
|
93
|
-
`) => Promise<\u4ECE\u8DEF\u5F84\u83B7\u5F97\u6B63\u786E\u8FD4\u56DE<\u8DEF\u5F84> | \u4ECE\u8DEF\u5F84\u83B7\u5F97\u9519\u8BEF\u8FD4\u56DE<\u8DEF\u5F84>>`,
|
|
94
|
-
""
|
|
95
|
-
];
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
附加代码
|
|
99
|
-
};
|