linshudery
V2EX  ›  问与答

问个 vue.js 源码语法的问题

  •  
  •   linshudery · May 12, 2017 · 6030 views
    This topic created in 3469 days ago, the information mentioned may be changed or developed.

    export function initMixin (Vue: Class<component>) { Vue.prototype._init = function (options?: Object) { const vm: Component = this .... }

    请问这个 Vue: vm:冒号和 Class<component>是什么意思? 这是 Javascript 的语法吗

    2 replies  •  2017-05-13 00:25:43 +08:00
    seki
    seki
    May 13, 2017
    1
    这个是 flow 的 type 语法,vue 用了 flow 做静态类型检查
    https://flow.org/
    linshudery
    linshudery
    OP
    May 13, 2017
    2
    谢谢,了解了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4359 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 07:43 · PVG 15:43 · LAX 23:43 · JFK 02:43
    ♥ Do have faith in what you're doing.