Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions types/vue-meta.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface RefreshedTags {

interface Refreshed {
vm: Component,
metaInfo: MetaInfo,
metaInfo: MetaInfoOutput,
tags: RefreshedTags
}

Expand Down Expand Up @@ -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
Expand All @@ -188,8 +188,12 @@ export interface MetaInfo {
[key: string]: string[]
}

changed?: <T extends MetaInfo>(newInfo: T, addedTags: elements, removedTags: elements) => void
afterNavigation?: <T extends MetaInfo>(newInfo: T) => void
changed?: <T extends MetaInfoOutput>(newInfo: T, addedTags: elements, removedTags: elements) => void
afterNavigation?: <T extends MetaInfoOutput>(newInfo: T) => void
}

export interface MetaInfoOutput extends MetaInfo {
titleChunk?: string
}

export type MetaInfoComputed = () => MetaInfo
Expand Down