如何使用带有CDN包含对象的flowtype?

时间:2018-07-28 01:09:24

标签: vue.js flowtype

我想使用流程类型检查一些Vue代码,其中包括vue:

view

和js代码:

...
onInit: function() {
  oVizFrameBar = this.byId("idVizFrameBar"); 
  oVizFrame.setVizProperties({
    plotArea: {
      dataLabel: {
        position: 'inside'
      }
    }
  }
}
...

但是flowtype会报告错误,如何处理这种错误:

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

1 个答案:

答案 0 :(得分:0)

当前,官方Vue.js或flow-typed都没有Vue.js的官方Flowtype定义。

因此,看起来以下几行是快速解决方法:

declare var Vue:any