File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' openapi-ts-request ' : patch
3
+ ---
4
+
5
+ perf: perf parmas customTemplates type definition
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { PriorityRule, ReactQueryMode } from './config';
4
4
import type { TypescriptFileType } from './generator/config' ;
5
5
import { mockGenerator } from './generator/mockGenarator' ;
6
6
import ServiceGenerator from './generator/serviceGenarator' ;
7
- import type { APIDataType } from './generator/type' ;
7
+ import type { APIDataType , ITypeItem } from './generator/type' ;
8
8
import type {
9
9
ComponentsObject ,
10
10
IPriorityRule ,
@@ -239,27 +239,26 @@ export type GenerateServiceProps = {
239
239
*/
240
240
customTemplates ?: {
241
241
/**
242
- * 自定义 displayTypeLabel 模板
242
+ * 自定义 serviceController 模板
243
243
*/
244
- [ TypescriptFileType . displayTypeLabel ] ?: < T , U > (
245
- types : T [ ] ,
246
- config : U
244
+ [ TypescriptFileType . serviceController ] ?: < T , U > (
245
+ item : T ,
246
+ context : U
247
247
) => string ;
248
248
/**
249
249
* 自定义 displayEnumLabel 模板
250
250
*/
251
251
[ TypescriptFileType . displayEnumLabel ] ?: < T , U > (
252
252
enums : T [ ] ,
253
253
config : U
254
- ) => string ;
255
-
254
+ ) => ITypeItem [ ] ;
256
255
/**
257
- * 自定义 serviceController 模板
256
+ * 自定义 displayTypeLabel 模板
258
257
*/
259
- [ TypescriptFileType . serviceController ] ?: < T , U > (
260
- item : T ,
261
- context : U
262
- ) => string ;
258
+ [ TypescriptFileType . displayTypeLabel ] ?: < T , U > (
259
+ types : T [ ] ,
260
+ config : U
261
+ ) => ITypeItem [ ] ;
263
262
} ;
264
263
} ;
265
264
} ;
You can’t perform that action at this time.
0 commit comments