From 6fbbf8c5bc6b75ce9df2282b9b13c63db09ad1ca Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 1 Sep 2022 10:08:56 +0100 Subject: [PATCH] refactor(nuxt): remove unused `meta:register` hook (#7130) --- docs/content/3.api/4.advanced/1.hooks.md | 1 - packages/nuxt/src/app/nuxt.ts | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/content/3.api/4.advanced/1.hooks.md b/docs/content/3.api/4.advanced/1.hooks.md index cc8abdb490..979f847a86 100644 --- a/docs/content/3.api/4.advanced/1.hooks.md +++ b/docs/content/3.api/4.advanced/1.hooks.md @@ -12,7 +12,6 @@ Hook | Arguments | Environment | Description `app:error` | `err` | Server & Client | Called when a fatal error occurs. `app:error:cleared` | `{ redirect? }` | Server & Client | Called when a fatal error occurs. `app:data:refresh` | `keys?` | Server & Client | (internal) -`meta:register` | `metaRenderers` | Server & Client | (internal) `vue:setup` | - | Server & Client | (internal) `vue:error` | `err, target, info` | Server & Client | Called when a vue error propages to the root component. [Learn More](https://vuejs.org/api/composition-api-lifecycle.html#onerrorcaptured). `app:rendered` | `renderContext` | Server | Called when SSR rendering is done. diff --git a/packages/nuxt/src/app/nuxt.ts b/packages/nuxt/src/app/nuxt.ts index cdada80b45..426b2784e0 100644 --- a/packages/nuxt/src/app/nuxt.ts +++ b/packages/nuxt/src/app/nuxt.ts @@ -33,7 +33,6 @@ export interface RuntimeNuxtHooks { 'app:data:refresh': (keys?: string[]) => HookResult 'page:start': (Component?: VNode) => HookResult 'page:finish': (Component?: VNode) => HookResult - 'meta:register': (metaRenderers: Array<(nuxt: NuxtApp) => NuxtMeta | Promise>) => HookResult 'vue:setup': () => void 'vue:error': (...args: Parameters[0]>) => HookResult } @@ -70,7 +69,7 @@ interface _NuxtApp { data: Ref pending: Ref error: Ref - }>, + }>, ssrContext?: NuxtSSRContext payload: { @@ -92,7 +91,7 @@ interface _NuxtApp { provide: (name: string, value: any) => void } -export interface NuxtApp extends _NuxtApp { } +export interface NuxtApp extends _NuxtApp {} export const NuxtPluginIndicator = '__nuxt_plugin' export interface Plugin = Record> {