From a84d6d6fd0099912ab5c552e73357a3bcddcf5ef Mon Sep 17 00:00:00 2001 From: Viljami Kuosmanen Date: Tue, 10 Sep 2024 19:11:37 +0200 Subject: [PATCH] Lint fix --- packages/typegen/src/typegen.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/typegen/src/typegen.ts b/packages/typegen/src/typegen.ts index 8d28e15..17f094d 100644 --- a/packages/typegen/src/typegen.ts +++ b/packages/typegen/src/typegen.ts @@ -82,7 +82,10 @@ export async function main() { opts.disableOptionalPathParameters = argv.disableOptionalPathParameters ?? true; - const [imports, schemaTypes, operationTypings, banner, aliases] = await generateTypesForDocument(argv._[0] as string, opts); + const [imports, schemaTypes, operationTypings, banner, aliases] = await generateTypesForDocument( + argv._[0] as string, + opts, + ); if (opts.banner && banner?.length) { console.log(banner, '\n'); @@ -114,7 +117,7 @@ export async function generateTypesForDocument(definition: Document | string, op const api = new OpenAPIClientAxios({ definition: normalizedSchema as Document }); await api.init(); - + const operationTypings = generateOperationMethodTypings(api, exportedTypes, opts); const rootLevelAliases = generateRootLevelAliases(exportedTypes); @@ -252,9 +255,7 @@ const generateRootLevelAliases = (exportedTypes: ExportedType[]) => { for (const exportedType of exportedTypes) { if (exportedType.schemaRef.startsWith('#/components/schemas/')) { const name = exportedType.schemaRef.replace('#/components/schemas/', ''); - aliases.push([ - `export type ${name} = ${exportedType.path};`, - ].join('\n')); + aliases.push([`export type ${name} = ${exportedType.path};`].join('\n')); } }