fix(nuxt): add `refresh` type in server component refs (#27778)

This commit is contained in:
Julien Huang 2024-06-24 11:42:03 +02:00 committed by Daniel Roe
parent 7433509734
commit a7ad7c4174
No known key found for this signature in database
GPG Key ID: CBC814C393D93268
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ export const componentsTypeTemplate = {
]
})
const islandType = 'type IslandComponent<T extends DefineComponent> = T & DefineComponent<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, SlotsType<{ fallback: { error: unknown } }>>'
const islandType = 'type IslandComponent<T extends DefineComponent> = T & DefineComponent<{}, {refresh: () => Promise<void>}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, SlotsType<{ fallback: { error: unknown } }>>'
return `
import type { DefineComponent, SlotsType } from 'vue'
${nuxt.options.experimental.componentIslands ? islandType : ''}