2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-24 07:40:35 +03:00

feat(ts): update types for v2 (#338)

* chore: update types for v2

* fix: script.type shouldnt be required

fix: define meta.http-equiv as string, too many options to list

* chore: improve types

* chore: update typescript dependency

* chore: remove unnecessary gitignore

* chore: add metainfocomputed type

* chore: use camelcase for type

* chore: add interfaces for metaInfo properties

* chore: add missing body boolen for script types

* chore: include all type files on build

* chore: remove unused import
This commit is contained in:
Pim
2019-04-03 13:41:37 +02:00
committed by GitHub
parent 111c76970b
commit 7b85ff22f5
7 changed files with 487 additions and 424 deletions
+10 -10
View File
@@ -2,17 +2,17 @@
* Augment the typings of Vue.js
*/
import Vue, { ComponentOptions } from "vue";
import { MetaInfo } from './index';
import Vue, { ComponentOptions } from 'vue'
import { MetaInfo, MetaInfoComputed, VueMetaPlugin } from './vue-meta'
declare module "vue/types/options" {
interface ComponentOptions<V extends Vue> {
metaInfo?: MetaInfo | (() => MetaInfo)
}
}
declare module "vue/types/vue" {
declare module 'vue/types/vue' {
interface Vue {
$meta(): MetaInfo
$meta(): VueMetaPlugin
}
}
declare module 'vue/types/options' {
interface ComponentOptions<V extends Vue> {
metaInfo?: MetaInfo | MetaInfoComputed
}
}