mirror of https://github.com/vuejs/vue.git
fix flow / missing annotations
This commit is contained in:
parent
d2df58e547
commit
92903f320c
|
|
@ -1,18 +1,18 @@
|
|||
/* flow */
|
||||
/* @flow */
|
||||
|
||||
import { remove } from 'shared/util'
|
||||
|
||||
export default {
|
||||
create (_, vnode) {
|
||||
create (_: any, vnode: VNodeWithData) {
|
||||
registerRef(vnode)
|
||||
},
|
||||
update (oldVnode, vnode) {
|
||||
update (oldVnode: VNodeWithData, vnode: VNodeWithData) {
|
||||
if (oldVnode.data.ref !== vnode.data.ref) {
|
||||
registerRef(oldVnode, true)
|
||||
registerRef(vnode)
|
||||
}
|
||||
},
|
||||
destroy (vnode) {
|
||||
destroy (vnode: VNodeWithData) {
|
||||
registerRef(vnode, true)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* @flow */
|
||||
|
||||
import { extend } from 'shared/util'
|
||||
import { compile as baseCompile, baseOptions } from 'web/compiler/index'
|
||||
import { detectErrors } from 'compiler/error-detector'
|
||||
|
|
@ -12,9 +14,10 @@ export function compile (
|
|||
options = options || {}
|
||||
const errors = []
|
||||
// allow injecting modules/directives
|
||||
const baseModules = baseOptions.modules || []
|
||||
const modules = options.modules
|
||||
? baseOptions.modules.concat(options.modules)
|
||||
: baseOptions.modules
|
||||
? baseModules.concat(options.modules)
|
||||
: baseModules
|
||||
const directives = options.directives
|
||||
? extend(extend({}, baseOptions.directives), options.directives)
|
||||
: baseOptions.directives
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { updateListeners } from 'core/vdom/helpers'
|
||||
|
||||
function updateDOMListeners (oldVnode: VNodeWithData, vnode: VNodeWithData) {
|
||||
function updateDOMListeners (oldVnode, vnode) {
|
||||
if (!oldVnode.data.on && !vnode.data.on) {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* @flow */
|
||||
|
||||
import * as nodeOps from 'web/runtime/node-ops'
|
||||
import { createPatchFunction } from 'core/vdom/patch'
|
||||
import baseModules from 'core/vdom/modules/index'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
/* @flow */
|
||||
|
||||
import { inBrowser } from 'core/util/index'
|
||||
import { isIE9 } from 'web/util/index'
|
||||
import { remove } from 'shared/util'
|
||||
|
|
@ -47,7 +49,7 @@ export function removeTransitionClass (el: any, cls: string) {
|
|||
|
||||
export function whenTransitionEnds (
|
||||
el: Element,
|
||||
expectedType: ?stirng,
|
||||
expectedType: ?string,
|
||||
cb: Function
|
||||
) {
|
||||
const { type, timeout, propCount } = getTransitionInfo(el, expectedType)
|
||||
|
|
@ -77,6 +79,7 @@ export function getTransitionInfo (el: Element, expectedType?: ?string): {
|
|||
type: ?string;
|
||||
propCount: number;
|
||||
timeout: number;
|
||||
hasTransform: boolean;
|
||||
} {
|
||||
const styles = window.getComputedStyle(el)
|
||||
const transitioneDelays = styles[transitionProp + 'Delay'].split(', ')
|
||||
|
|
|
|||
Loading…
Reference in New Issue