Skip to content

Commit

Permalink
fix: adds underscores to make loadash camelCase work properly when ge…
Browse files Browse the repository at this point in the history
…nerating typescript type names
  • Loading branch information
mledl committed Jun 10, 2024
1 parent 71d5c4a commit b2e4d49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/typescript/generateTypesFromJSONSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export class GenerateTypesFromJSONSchemas {
*/
#getComponentType(componentName: string) {
const componentType = startCase(
camelCase(`${this.#options.typeNamesPrefix ?? ""}${componentName}${this.#options.typeNamesSuffix}`)
camelCase(`${this.#options.typeNamesPrefix ?? ""}_${componentName}_${this.#options.typeNamesSuffix}`)
).replace(/ /g, "");

/**
Expand Down

0 comments on commit b2e4d49

Please sign in to comment.