File tree Expand file tree Collapse file tree
src/features/schema/helper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ export function getTypescriptFieldType(
4444 className : string ,
4545 config ?: { customClassFieldTypes ?: CustomClassFieldType [ ] }
4646) : { type : string ; importfrom ?: string } {
47+ if ( config && fieldName && className ) {
48+ const custom = getCustomFieldType ( config , className , fieldName ) ;
49+ if ( custom ) return custom ;
50+ }
51+
4752 switch ( fieldAttributes . type ) {
4853 case "String" :
4954 return { type : "string" } ;
@@ -54,21 +59,11 @@ export function getTypescriptFieldType(
5459 case "Boolean" :
5560 return { type : "boolean" } ;
5661
57- case "Object" : {
58- if ( config && fieldName ) {
59- const custom = getCustomFieldType ( config , className , fieldName ) ;
60- if ( custom ) return custom ;
61- }
62+ case "Object" :
6263 return { type : `any` } ;
63- }
6464
65- case "Array" : {
66- if ( config && fieldName ) {
67- const custom = getCustomFieldType ( config , className , fieldName ) ;
68- if ( custom ) return custom ;
69- }
65+ case "Array" :
7066 return { type : `any[]` } ;
71- }
7267
7368 case "Date" :
7469 if ( sdk ) {
You can’t perform that action at this time.
0 commit comments