gg-express 1.0.103 → 1.0.104
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/v2/output/staticRouteInterface_hotel_v2.d.ts +23 -46
- package/dist/v2/run_v2.test.js +27 -95
- package/dist/v2/typeResolver.d.ts +1 -1
- package/package.json +1 -1
- package/src/v2/generateStaticRouteFileV2.ts +1 -1
- package/src/v2/output/staticRouteInterface_hotel_v2.ts +26 -78
- package/src/v2/run_v2.test.ts +28 -100
- package/src/v2/typeResolver.ts +9 -3
|
@@ -2,8 +2,7 @@ export interface staticRouteInterface_hotel_v2 {
|
|
|
2
2
|
get: {
|
|
3
3
|
"/api/hotel/users/id": {
|
|
4
4
|
requireParams: {
|
|
5
|
-
|
|
6
|
-
data: {
|
|
5
|
+
booking: {
|
|
7
6
|
id: number;
|
|
8
7
|
bookingGroupID: number;
|
|
9
8
|
checkInDate: string;
|
|
@@ -24,37 +23,30 @@ export interface staticRouteInterface_hotel_v2 {
|
|
|
24
23
|
reasonToCancel: string;
|
|
25
24
|
note: string;
|
|
26
25
|
};
|
|
27
|
-
|
|
28
|
-
status: "on" | "off";
|
|
29
|
-
};
|
|
26
|
+
}[];
|
|
30
27
|
responseStructure: {
|
|
31
28
|
data: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
actual: number;
|
|
54
|
-
};
|
|
55
|
-
notReturnQty: number;
|
|
56
|
-
}[];
|
|
57
|
-
}[];
|
|
29
|
+
0: {
|
|
30
|
+
id: number;
|
|
31
|
+
bookingGroupID: number;
|
|
32
|
+
checkInDate: string;
|
|
33
|
+
checkOutDate: string;
|
|
34
|
+
checkInTime: string;
|
|
35
|
+
checkOutTime: string;
|
|
36
|
+
roomRate: number;
|
|
37
|
+
extraBedRate: number;
|
|
38
|
+
roomNumber?: string | undefined | null;
|
|
39
|
+
editTime: string;
|
|
40
|
+
createTime: string;
|
|
41
|
+
shiftDate: string;
|
|
42
|
+
shiftName: string;
|
|
43
|
+
userName: string;
|
|
44
|
+
bookingStatus: "ACTIVE" | "CLOSE" | "CANCEL" | "NO_SHOW";
|
|
45
|
+
is_specificRoom: number;
|
|
46
|
+
guestCount: number;
|
|
47
|
+
reasonToCancel: string;
|
|
48
|
+
note: string;
|
|
49
|
+
};
|
|
58
50
|
};
|
|
59
51
|
status: "SUCCESS" | "ERROR";
|
|
60
52
|
message: string;
|
|
@@ -79,21 +71,6 @@ export interface staticRouteInterface_hotel_v2 {
|
|
|
79
71
|
message: string;
|
|
80
72
|
};
|
|
81
73
|
};
|
|
82
|
-
"/api/hotel/testPost": {
|
|
83
|
-
requireParams: {
|
|
84
|
-
id?: number;
|
|
85
|
-
};
|
|
86
|
-
responseStructure: {
|
|
87
|
-
data: {
|
|
88
|
-
bookingData: {
|
|
89
|
-
id: number;
|
|
90
|
-
roomNumber: string;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
status: "SUCCESS" | "ERROR";
|
|
94
|
-
message: string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
74
|
};
|
|
98
75
|
put: {};
|
|
99
76
|
delete: {};
|
package/dist/v2/run_v2.test.js
CHANGED
|
@@ -43,82 +43,36 @@ function run() {
|
|
|
43
43
|
const ggapp = new GGExpressV2_1.default(app, "hotel", ["./output"]);
|
|
44
44
|
ggapp.get("/api/hotel/users/id", {
|
|
45
45
|
requireParams: {
|
|
46
|
-
|
|
47
|
-
data: {
|
|
48
|
-
id: "number",
|
|
49
|
-
data: exports.hotel_model_const_temp["booking"],
|
|
50
|
-
name: "string",
|
|
51
|
-
status: ["on", "off"],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
responseStructure: {
|
|
55
|
-
x: "string",
|
|
56
|
-
data: [
|
|
57
|
-
{
|
|
58
|
-
zoneID: "number",
|
|
59
|
-
zoneName: "string",
|
|
60
|
-
data: [
|
|
61
|
-
{
|
|
62
|
-
itemID: "number",
|
|
63
|
-
itemEachHotelID: "number",
|
|
64
|
-
itemName: "string",
|
|
65
|
-
requisitionQty: {
|
|
66
|
-
expected: "number",
|
|
67
|
-
actual: "number",
|
|
68
|
-
},
|
|
69
|
-
zoneStockQty: {
|
|
70
|
-
begin: "number",
|
|
71
|
-
end: "number",
|
|
72
|
-
},
|
|
73
|
-
usedQty: "number",
|
|
74
|
-
lossQty: "number",
|
|
75
|
-
damageQty: "number",
|
|
76
|
-
returnQty: {
|
|
77
|
-
expected: "number",
|
|
78
|
-
actual: "number",
|
|
79
|
-
},
|
|
80
|
-
notReturnQty: "number",
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
],
|
|
46
|
+
data: [exports.hotel_model_const_temp],
|
|
85
47
|
},
|
|
48
|
+
responseStructure: [exports.hotel_model_const_temp.booking],
|
|
86
49
|
}, (req, res, next) => {
|
|
87
50
|
return res.json({
|
|
88
51
|
message: "",
|
|
89
52
|
status: "SUCCESS",
|
|
90
|
-
data:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
expected: 0,
|
|
114
|
-
actual: 0,
|
|
115
|
-
},
|
|
116
|
-
notReturnQty: 0,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
},
|
|
53
|
+
data: [
|
|
54
|
+
{
|
|
55
|
+
id: 0,
|
|
56
|
+
bookingGroupID: 0,
|
|
57
|
+
checkInDate: "",
|
|
58
|
+
checkOutDate: "",
|
|
59
|
+
checkInTime: "",
|
|
60
|
+
checkOutTime: "",
|
|
61
|
+
roomRate: 0,
|
|
62
|
+
extraBedRate: 0,
|
|
63
|
+
roomNumber: undefined,
|
|
64
|
+
editTime: "",
|
|
65
|
+
createTime: "",
|
|
66
|
+
shiftDate: "",
|
|
67
|
+
shiftName: "",
|
|
68
|
+
userName: "",
|
|
69
|
+
bookingStatus: "ACTIVE",
|
|
70
|
+
is_specificRoom: 0,
|
|
71
|
+
guestCount: 0,
|
|
72
|
+
reasonToCancel: "",
|
|
73
|
+
note: "",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
122
76
|
});
|
|
123
77
|
});
|
|
124
78
|
ggapp.post("/api/hotel/booking/id", {
|
|
@@ -148,26 +102,6 @@ function run() {
|
|
|
148
102
|
},
|
|
149
103
|
});
|
|
150
104
|
});
|
|
151
|
-
ggapp.post("/api/hotel/testPost", {
|
|
152
|
-
requireParams: {
|
|
153
|
-
isPartial: true,
|
|
154
|
-
data: {
|
|
155
|
-
id: "number",
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
responseStructure: {
|
|
159
|
-
bookingData: {
|
|
160
|
-
id: "number",
|
|
161
|
-
roomNumber: "string",
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
}, (req, res, next) => {
|
|
165
|
-
req.body.id;
|
|
166
|
-
return res.json({
|
|
167
|
-
status: "ERROR",
|
|
168
|
-
message: "",
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
105
|
app.listen(3002, () => __awaiter(this, void 0, void 0, function* () {
|
|
172
106
|
yield ggapp.generateAPIFiles();
|
|
173
107
|
console.log("done");
|
|
@@ -178,13 +112,11 @@ run();
|
|
|
178
112
|
// setTimeout(() => {
|
|
179
113
|
// const x = new GGApi_v2()
|
|
180
114
|
// //@ts-ignore
|
|
181
|
-
// x.get("http://localhost:3002/api/hotel/users/id",
|
|
182
|
-
// id: 1,
|
|
183
|
-
// })
|
|
115
|
+
// x.get("http://localhost:3002/api/hotel/users/id", [])
|
|
184
116
|
// .then((response) => {
|
|
185
117
|
// console.log("response", response)
|
|
186
118
|
// })
|
|
187
119
|
// .catch((error) => {
|
|
188
|
-
// console.error("fetch error")
|
|
120
|
+
// console.error("fetch error", error)
|
|
189
121
|
// })
|
|
190
122
|
// }, 3000)
|
|
@@ -4,7 +4,7 @@ type CustomType = BaseType | `${BaseType}?` | `${BaseType}~` | `${BaseType}?~`;
|
|
|
4
4
|
type InputEnum = readonly string[] | readonly number[];
|
|
5
5
|
export type ConstSchemaType = {
|
|
6
6
|
[key in string]: CustomType | ConstSchemaType | ConstSchemaType[] | InputEnum;
|
|
7
|
-
};
|
|
7
|
+
} | ConstSchemaType[];
|
|
8
8
|
type ResolveBase<T extends BaseType> = T extends "string" ? string : T extends "string[]" ? string[] : T extends "number" ? number : T extends "number[]" ? number[] : T extends "boolean" ? boolean : T extends "boolean[]" ? boolean[] : never;
|
|
9
9
|
export declare const toArray: <T>(input: T) => T[];
|
|
10
10
|
type ResolveExtraType<T> = T extends `${infer B}?~` ? ResolveBase<B & BaseType> | null | undefined : T extends `${infer B}?` ? ResolveBase<B & BaseType> | undefined : T extends `${infer B}~` ? ResolveBase<B & BaseType> | null : ResolveBase<T & BaseType>;
|
package/package.json
CHANGED
|
@@ -100,7 +100,7 @@ function parentInputToCode(
|
|
|
100
100
|
target[0] === null ||
|
|
101
101
|
target[0] === undefined
|
|
102
102
|
)
|
|
103
|
-
return `${getParentKeyCode(parentKeyName)} : ${
|
|
103
|
+
return `${getParentKeyCode(parentKeyName)} : ${target
|
|
104
104
|
.map((word) => ` "${word}" `)
|
|
105
105
|
.join("|")} `
|
|
106
106
|
// nest or input nest
|
|
@@ -1,79 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
name: string
|
|
28
|
-
status: "on" | "off"
|
|
29
|
-
}
|
|
30
|
-
responseStructure: {
|
|
31
|
-
data: {
|
|
32
|
-
x: string
|
|
33
|
-
data: {
|
|
34
|
-
zoneID: number
|
|
35
|
-
zoneName: string
|
|
36
|
-
data: {
|
|
37
|
-
itemID: number
|
|
38
|
-
itemEachHotelID: number
|
|
39
|
-
itemName: string
|
|
40
|
-
requisitionQty: { expected: number; actual: number }
|
|
41
|
-
zoneStockQty: { begin: number; end: number }
|
|
42
|
-
usedQty: number
|
|
43
|
-
lossQty: number
|
|
44
|
-
damageQty: number
|
|
45
|
-
returnQty: { expected: number; actual: number }
|
|
46
|
-
notReturnQty: number
|
|
47
|
-
}[]
|
|
48
|
-
}[]
|
|
49
|
-
}
|
|
50
|
-
status: "SUCCESS" | "ERROR"
|
|
51
|
-
message: string
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
|
|
2
|
+
export interface staticRouteInterface_hotel_v2 {
|
|
3
|
+
get : {
|
|
4
|
+
"/api/hotel/users/id" : {
|
|
5
|
+
requireParams : {
|
|
6
|
+
booking : { id : number,bookingGroupID : number,checkInDate : string,checkOutDate : string,checkInTime : string,checkOutTime : string,roomRate : number,extraBedRate : number,roomNumber? : string | undefined | null,editTime : string,createTime : string,shiftDate : string,shiftName : string,userName : string,bookingStatus : "ACTIVE" | "CLOSE" | "CANCEL" | "NO_SHOW" ,is_specificRoom : number,guestCount : number,reasonToCancel : string,note : string } } [] ,
|
|
7
|
+
responseStructure : {
|
|
8
|
+
data : {
|
|
9
|
+
0 : { id : number,bookingGroupID : number,checkInDate : string,checkOutDate : string,checkInTime : string,checkOutTime : string,roomRate : number,extraBedRate : number,roomNumber? : string | undefined | null,editTime : string,createTime : string,shiftDate : string,shiftName : string,userName : string,bookingStatus : "ACTIVE" | "CLOSE" | "CANCEL" | "NO_SHOW" ,is_specificRoom : number,guestCount : number,reasonToCancel : string,note : string } } ,
|
|
10
|
+
status: "SUCCESS" | "ERROR",
|
|
11
|
+
message: string
|
|
12
|
+
}
|
|
13
|
+
} },
|
|
14
|
+
post : {
|
|
15
|
+
"/api/hotel/booking/id" : {
|
|
16
|
+
requireParams : { id? : number,id2? : number,name? : string } ,
|
|
17
|
+
responseStructure : {
|
|
18
|
+
data : {
|
|
19
|
+
bookingData : { id : number,roomNumber : string } } ,
|
|
20
|
+
status: "SUCCESS" | "ERROR",
|
|
21
|
+
message: string
|
|
22
|
+
}
|
|
23
|
+
} },
|
|
24
|
+
put : { },
|
|
25
|
+
delete : { },
|
|
54
26
|
}
|
|
55
|
-
|
|
56
|
-
"/api/hotel/booking/id": {
|
|
57
|
-
requireParams: { id?: number; id2?: number; name?: string }
|
|
58
|
-
responseStructure: {
|
|
59
|
-
data: {
|
|
60
|
-
bookingData: { id: number; roomNumber: string }
|
|
61
|
-
}
|
|
62
|
-
status: "SUCCESS" | "ERROR"
|
|
63
|
-
message: string
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
"/api/hotel/testPost": {
|
|
67
|
-
requireParams: { id?: number }
|
|
68
|
-
responseStructure: {
|
|
69
|
-
data: {
|
|
70
|
-
bookingData: { id: number; roomNumber: string }
|
|
71
|
-
}
|
|
72
|
-
status: "SUCCESS" | "ERROR"
|
|
73
|
-
message: string
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
put: {}
|
|
78
|
-
delete: {}
|
|
79
|
-
}
|
|
27
|
+
|
package/src/v2/run_v2.test.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import express from "express"
|
|
2
2
|
import GGExpressV2 from "./GGExpressV2"
|
|
3
3
|
import { toArray } from "./typeResolver"
|
|
4
|
+
import { GGApi_v2 } from "./output/apiConnector_hotel_v2"
|
|
4
5
|
|
|
5
6
|
export const hotel_model_const_temp = {
|
|
6
7
|
booking: {
|
|
@@ -33,83 +34,37 @@ function run() {
|
|
|
33
34
|
"/api/hotel/users/id",
|
|
34
35
|
{
|
|
35
36
|
requireParams: {
|
|
36
|
-
|
|
37
|
-
data: {
|
|
38
|
-
id: "number",
|
|
39
|
-
data: hotel_model_const_temp["booking"],
|
|
40
|
-
name: "string",
|
|
41
|
-
status: ["on", "off"],
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
responseStructure: {
|
|
45
|
-
x: "string",
|
|
46
|
-
data: [
|
|
47
|
-
{
|
|
48
|
-
zoneID: "number",
|
|
49
|
-
zoneName: "string",
|
|
50
|
-
data: [
|
|
51
|
-
{
|
|
52
|
-
itemID: "number",
|
|
53
|
-
itemEachHotelID: "number",
|
|
54
|
-
itemName: "string",
|
|
55
|
-
requisitionQty: {
|
|
56
|
-
expected: "number",
|
|
57
|
-
actual: "number",
|
|
58
|
-
},
|
|
59
|
-
zoneStockQty: {
|
|
60
|
-
begin: "number",
|
|
61
|
-
end: "number",
|
|
62
|
-
},
|
|
63
|
-
usedQty: "number",
|
|
64
|
-
lossQty: "number",
|
|
65
|
-
damageQty: "number",
|
|
66
|
-
returnQty: {
|
|
67
|
-
expected: "number",
|
|
68
|
-
actual: "number",
|
|
69
|
-
},
|
|
70
|
-
notReturnQty: "number",
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
],
|
|
37
|
+
data: [hotel_model_const_temp],
|
|
75
38
|
},
|
|
39
|
+
responseStructure: [hotel_model_const_temp.booking],
|
|
76
40
|
},
|
|
77
41
|
(req, res, next) => {
|
|
78
42
|
return res.json({
|
|
79
43
|
message: "",
|
|
80
44
|
status: "SUCCESS",
|
|
81
|
-
data:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
expected: 0,
|
|
105
|
-
actual: 0,
|
|
106
|
-
},
|
|
107
|
-
notReturnQty: 0,
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
},
|
|
45
|
+
data: [
|
|
46
|
+
{
|
|
47
|
+
id: 0,
|
|
48
|
+
bookingGroupID: 0,
|
|
49
|
+
checkInDate: "",
|
|
50
|
+
checkOutDate: "",
|
|
51
|
+
checkInTime: "",
|
|
52
|
+
checkOutTime: "",
|
|
53
|
+
roomRate: 0,
|
|
54
|
+
extraBedRate: 0,
|
|
55
|
+
roomNumber: undefined,
|
|
56
|
+
editTime: "",
|
|
57
|
+
createTime: "",
|
|
58
|
+
shiftDate: "",
|
|
59
|
+
shiftName: "",
|
|
60
|
+
userName: "",
|
|
61
|
+
bookingStatus: "ACTIVE",
|
|
62
|
+
is_specificRoom: 0,
|
|
63
|
+
guestCount: 0,
|
|
64
|
+
reasonToCancel: "",
|
|
65
|
+
note: "",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
113
68
|
})
|
|
114
69
|
}
|
|
115
70
|
)
|
|
@@ -145,31 +100,6 @@ function run() {
|
|
|
145
100
|
}
|
|
146
101
|
)
|
|
147
102
|
|
|
148
|
-
ggapp.post(
|
|
149
|
-
"/api/hotel/testPost",
|
|
150
|
-
{
|
|
151
|
-
requireParams: {
|
|
152
|
-
isPartial: true,
|
|
153
|
-
data: {
|
|
154
|
-
id: "number",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
responseStructure: {
|
|
158
|
-
bookingData: {
|
|
159
|
-
id: "number",
|
|
160
|
-
roomNumber: "string",
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
(req, res, next) => {
|
|
165
|
-
req.body.id
|
|
166
|
-
return res.json({
|
|
167
|
-
status: "ERROR",
|
|
168
|
-
message: "",
|
|
169
|
-
})
|
|
170
|
-
}
|
|
171
|
-
)
|
|
172
|
-
|
|
173
103
|
app.listen(3002, async () => {
|
|
174
104
|
await ggapp.generateAPIFiles()
|
|
175
105
|
console.log("done")
|
|
@@ -181,13 +111,11 @@ run()
|
|
|
181
111
|
// setTimeout(() => {
|
|
182
112
|
// const x = new GGApi_v2()
|
|
183
113
|
// //@ts-ignore
|
|
184
|
-
// x.get("http://localhost:3002/api/hotel/users/id",
|
|
185
|
-
// id: 1,
|
|
186
|
-
// })
|
|
114
|
+
// x.get("http://localhost:3002/api/hotel/users/id", [])
|
|
187
115
|
// .then((response) => {
|
|
188
116
|
// console.log("response", response)
|
|
189
117
|
// })
|
|
190
118
|
// .catch((error) => {
|
|
191
|
-
// console.error("fetch error")
|
|
119
|
+
// console.error("fetch error", error)
|
|
192
120
|
// })
|
|
193
121
|
// }, 3000)
|
package/src/v2/typeResolver.ts
CHANGED
|
@@ -11,9 +11,15 @@ type BaseType =
|
|
|
11
11
|
type CustomType = BaseType | `${BaseType}?` | `${BaseType}~` | `${BaseType}?~`
|
|
12
12
|
type InputEnum = readonly string[] | readonly number[]
|
|
13
13
|
|
|
14
|
-
export type ConstSchemaType =
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
export type ConstSchemaType =
|
|
15
|
+
| {
|
|
16
|
+
[key in string]:
|
|
17
|
+
| CustomType
|
|
18
|
+
| ConstSchemaType
|
|
19
|
+
| ConstSchemaType[]
|
|
20
|
+
| InputEnum
|
|
21
|
+
}
|
|
22
|
+
| ConstSchemaType[]
|
|
17
23
|
|
|
18
24
|
type ResolveBase<T extends BaseType> = T extends "string"
|
|
19
25
|
? string
|