From 1e2caa35c19c6765058e371357ef7575add2c252 Mon Sep 17 00:00:00 2001 From: Matthew Messinger Date: Tue, 5 Sep 2023 15:38:01 -0400 Subject: [PATCH] fix: malformed d.ts with multiple APIs with schema --- src/module.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/module.ts b/src/module.ts index f377370..eb1f6f6 100644 --- a/src/module.ts +++ b/src/module.ts @@ -217,7 +217,9 @@ export const ${getDataComposableName(i)} = (...args) => _useApiData('${i}', ...a import type { $Api, $OpenApi, ApiFetchOptions } from '${relativeTo('runtime/composables/$api')}' import type { UseApiData, UseOpenApiData, UseApiDataOptions } from '${relativeTo('runtime/composables/useApiData')}' -${schemaEndpointIds.map(i => `import type { paths as ${pascalCase(i)}Paths } from '#${moduleName}/${i}'`).join('')} +${schemaEndpointIds.map(i => ` +import type { paths as ${pascalCase(i)}Paths } from '#${moduleName}/${i}' +`.trimStart()).join('').trimEnd()} export type { $Api, $OpenApi, ApiFetchOptions, UseApiData, UseOpenApiData, UseApiDataOptions }