diff --git a/packages/nuxt/src/components/templates.ts b/packages/nuxt/src/components/templates.ts index 86e373450c..b1e5c3d7a0 100644 --- a/packages/nuxt/src/components/templates.ts +++ b/packages/nuxt/src/components/templates.ts @@ -119,9 +119,9 @@ ${nuxt.options.experimental.componentIslands ? islandType : ''} interface _GlobalComponents { ${componentTypes.map(([pascalName, type]) => ` '${pascalName}': ${type}`).join('\n')} ${componentTypes.map(([pascalName, type]) => ` 'Lazy${pascalName}': ${type}`).join('\n')} - ${componentTypes.map(([pascalName, type]) => ` 'LazyIdle${pascalName}': ${type}`).join('\n')} - ${componentTypes.map(([pascalName, type]) => ` 'LazyVisible${pascalName}': ${type}`).join('\n')} - ${componentTypes.map(([pascalName, type]) => ` 'LazyEvent${pascalName}': ${type}`).join('\n')} + ${componentTypes.map(([pascalName, type]) => ` 'LazyIdle${pascalName}': ${type} & DefineComponent<{loader?: IdleRequestOptions}>`).join('\n')} + ${componentTypes.map(([pascalName, type]) => ` 'LazyVisible${pascalName}': ${type} & DefineComponent<{loader?: Partial}>`).join('\n')} + ${componentTypes.map(([pascalName, type]) => ` 'LazyEvent${pascalName}': ${type} & DefineComponent<{loader?: Array}>`).join('\n')} } declare module '@vue/runtime-core' { @@ -138,9 +138,9 @@ declare module 'vue' { ${componentTypes.map(([pascalName, type]) => `export const ${pascalName}: ${type}`).join('\n')} ${componentTypes.map(([pascalName, type]) => `export const Lazy${pascalName}: ${type}`).join('\n')} -${componentTypes.map(([pascalName, type]) => `export const LazyIdle${pascalName}: ${type}`).join('\n')} -${componentTypes.map(([pascalName, type]) => `export const LazyVisible${pascalName}: ${type}`).join('\n')} -${componentTypes.map(([pascalName, type]) => `export const LazyEvent${pascalName}: ${type}`).join('\n')} +${componentTypes.map(([pascalName, type]) => `export const LazyIdle${pascalName}: ${type} & DefineComponent<{loader?: IdleRequestOptions}>`).join('\n')} +${componentTypes.map(([pascalName, type]) => `export const LazyVisible${pascalName}: ${type} & DefineComponent<{loader?: Partial}>`).join('\n')} +${componentTypes.map(([pascalName, type]) => `export const LazyEvent${pascalName}: ${type} & DefineComponent<{loader?: Array}>`).join('\n')} export const componentNames: string[] `