From d9475402f3b0879451838847fbb5ce704675882a Mon Sep 17 00:00:00 2001 From: Rodion Borisov Date: Sun, 7 Jun 2020 14:54:29 +0300 Subject: [PATCH] types: augment MetaInfo with missing titleChunk (#559) * Augment MetaInfo with missing titleChunk Fixes #557 * MetaInfoOutput extends MetaInfo https://github.com/nuxt/vue-meta/pull/559#issuecomment-626967757 --- types/vue-meta.d.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/types/vue-meta.d.ts b/types/vue-meta.d.ts index 6cef142..fbf5469 100644 --- a/types/vue-meta.d.ts +++ b/types/vue-meta.d.ts @@ -33,7 +33,7 @@ interface RefreshedTags { interface Refreshed { vm: Component, - metaInfo: MetaInfo, + metaInfo: MetaInfoOutput, tags: RefreshedTags } @@ -166,7 +166,7 @@ export interface NoScriptProperty extends MetaDataProperty { export interface MetaInfo { title?: string - titleTemplate?: string | ((titleChunk: string) => string) + titleTemplate?: string | ((titleChunk: string) => string), htmlAttrs?: AttributeProperty headAttrs?: AttributeProperty @@ -188,8 +188,12 @@ export interface MetaInfo { [key: string]: string[] } - changed?: (newInfo: T, addedTags: elements, removedTags: elements) => void - afterNavigation?: (newInfo: T) => void + changed?: (newInfo: T, addedTags: elements, removedTags: elements) => void + afterNavigation?: (newInfo: T) => void +} + +export interface MetaInfoOutput extends MetaInfo { + titleChunk?: string } export type MetaInfoComputed = () => MetaInfo