Merge pull request #262 from bknd-io/fix/typegen-valid-identifiers-and-comments

fix: typegen: adjust field formatting and type name handling
This commit is contained in:
dswbx
2025-09-18 09:57:01 +02:00
committed by GitHub

View File

@@ -50,7 +50,7 @@ export class EntityTypescript {
indentWidth: 2, indentWidth: 2,
indentChar: " ", indentChar: " ",
entityCommentMultiline: true, entityCommentMultiline: true,
fieldCommentMultiline: false, fieldCommentMultiline: true,
}; };
} }
@@ -82,7 +82,7 @@ export class EntityTypescript {
} }
typeName(name: string) { typeName(name: string) {
return autoFormatString(name); return autoFormatString(name).replace(/ /g, "");
} }
fieldTypesToString(type: TEntityTSType, opts?: { ignore_fields?: string[]; indent?: number }) { fieldTypesToString(type: TEntityTSType, opts?: { ignore_fields?: string[]; indent?: number }) {