2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-12 18:32:27 +03:00

types: add json property (#439)

This commit is contained in:
tsulala_asagiri
2019-08-27 17:47:29 +09:00
committed by Pim
parent 4384f441e3
commit 96a14f7284
+11 -1
View File
@@ -136,6 +136,16 @@ export interface ScriptPropertySrcCallback extends ScriptPropertyBase {
callback: CallbackFn
}
type JsonVal = string | number | boolean | JsonObj | JsonObj[] | null
interface JsonObj {
[key: string]: JsonVal | JsonVal[]
}
export interface ScriptPropertyJson extends ScriptPropertyBase {
json: JsonObj
}
export interface NoScriptProperty extends MetaDataProperty {
innerHTML: string,
}
@@ -156,7 +166,7 @@ export interface MetaInfo {
meta?: (MetaPropertyCharset | MetaPropertyEquiv | MetaPropertyName | MetaPropertyMicrodata | MetaPropertyProperty)[]
link?: (LinkPropertyBase | LinkPropertyHref | LinkPropertyHrefCallback)[]
style?: StyleProperty[]
script?: (ScriptPropertyText | ScriptPropertySrc | ScriptPropertySrcCallback)[]
script?: (ScriptPropertyText | ScriptPropertySrc | ScriptPropertySrcCallback | ScriptPropertyJson)[]
noscript?: NoScriptProperty[]
__dangerouslyDisableSanitizers?: string[]