Apologies for the lackluster title (I struggled to think of a better one).
I'm currently analyzing some Vue
code, and I stumbled upon this:
export function initMixin (Vue: Class<Component>) { // ... }
What exactly does Class<Component>
signify in this particular scenario? And what about the colon? Here, we are passing the variable Vue
to the initMixin
function. Vue is basically just a declaration of a factory class. Despite immersing myself in ES2015, I am still perplexed by its purpose.
You can find the file at https://github.com/vuejs/vue/blob/next/src/core/instance/init.js, specifically on line 12.
Thank you!