【发布时间】:2020-11-18 12:05:03
【问题描述】:
我想使用带有 typescript 和 gridsome 的 Vuejs。
typescript 端的插件使用是gridsome-plugin-typescript。
这是我的<script>
<script lang='ts'>
import Vue from "vue"
export default Vue.extend({
metaInfo: {
title: 'About us'
}
})
</script>
我收到以下错误:
No overload matches this call.
The last overload gave the following error.
Argument of type '{ metaInfo: { title: string; }; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>'.
Object literal may only specify known properties, and 'metaInfo' does not exist in type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>'
似乎与不接受参数的插件有关。但不确定。
【问题讨论】:
标签: typescript vue.js gridsome