From 96a14f7284495d6a175ebc1f42e5ca6151ad4917 Mon Sep 17 00:00:00 2001 From: tsulala_asagiri <39614590+tsulala-asagiri@users.noreply.github.com> Date: Tue, 27 Aug 2019 17:47:29 +0900 Subject: [PATCH] types: add json property (#439) --- types/vue-meta.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/types/vue-meta.d.ts b/types/vue-meta.d.ts index 8425d40..711fa3a 100644 --- a/types/vue-meta.d.ts +++ b/types/vue-meta.d.ts @@ -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[]