2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-23 23:10:34 +03:00

Finally solved the types.

This commit is contained in:
Raiondesu
2018-02-09 17:45:02 +03:00
parent 834326b015
commit 92d913413b
5 changed files with 39 additions and 15 deletions
+16
View File
@@ -79,6 +79,7 @@
- [How do I populate `metaInfo` from the result of an asynchronous action?](#how-do-i-populate-metainfo-from-the-result-of-an-asynchronous-action)
- [Why doesn't `vue-meta` support `jsnext:main`?](#why-doesnt-vue-meta-support-jsnextmain)
- [Examples](#examples)
- [TypeScript Support](#typescript-support)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -794,3 +795,18 @@ If this were not the case, you would have to instruct Babel to convert `default`
# Examples
To run the examples; clone this repository & run `npm install` in the root directory, and then run `npm run dev`. Head to http://localhost:8080.
# TypeScript Support
If you have problems with types using vue-meta, then you're most probably using vue-class-component.
In any troublesome situation, just add the following ambient declaration to your types:
```js
import { MetaInfo } from 'vue-meta';
declare module "vue/types/vue" {
interface Vue {
metaInfo?: MetaInfo | (() => MetaInfo)
}
}
```