mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 17:07:22 +00:00
fix(kit): correct render result types (#170)
This commit is contained in:
parent
6bde903273
commit
4c0ba0151d
@ -18,6 +18,19 @@ type TemplateFile = string | {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type WatchEvent = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'
|
type WatchEvent = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'
|
||||||
|
interface PreloadFile {
|
||||||
|
asType: 'script' | 'style' | 'font'
|
||||||
|
extension: string
|
||||||
|
file: string
|
||||||
|
fileWithoutQuery: string
|
||||||
|
}
|
||||||
|
type RenderResult = {
|
||||||
|
html: string
|
||||||
|
cspScriptSrcHashes: string[]
|
||||||
|
error: any
|
||||||
|
redirected: boolean
|
||||||
|
preloadFiles: PreloadFile[]
|
||||||
|
}
|
||||||
|
|
||||||
export interface NuxtHooks {
|
export interface NuxtHooks {
|
||||||
// Don't break usage of untyped hooks
|
// Don't break usage of untyped hooks
|
||||||
@ -64,9 +77,9 @@ export interface NuxtHooks {
|
|||||||
'render:done': (server: Server) => HookResult
|
'render:done': (server: Server) => HookResult
|
||||||
'listen': (listenerServer: any, listener: any) => HookResult
|
'listen': (listenerServer: any, listener: any) => HookResult
|
||||||
'server:nuxt:renderLoading': (req: IncomingMessage, res: ServerResponse) => HookResult
|
'server:nuxt:renderLoading': (req: IncomingMessage, res: ServerResponse) => HookResult
|
||||||
'render:route': (url: string, result: string, context: any) => HookResult
|
'render:route': (url: string, result: RenderResult, context: any) => HookResult
|
||||||
'render:routeDone': (url: string, result: string, context: any) => HookResult
|
'render:routeDone': (url: string, result: RenderResult, context: any) => HookResult
|
||||||
'render:beforeResponse': (url: string, result: string, context: any) => HookResult
|
'render:beforeResponse': (url: string, result: RenderResult, context: any) => HookResult
|
||||||
|
|
||||||
// @nuxt/vue-renderer
|
// @nuxt/vue-renderer
|
||||||
'render:resourcesLoaded': (resources: any) => HookResult
|
'render:resourcesLoaded': (resources: any) => HookResult
|
||||||
|
Loading…
Reference in New Issue
Block a user