Skip to content

Commit 92903f3

Browse files
committed
fix flow / missing annotations
1 parent d2df58e commit 92903f3

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

src/core/vdom/modules/ref.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/* flow */
1+
/* @flow */
22

33
import { remove } from 'shared/util'
44

55
export default {
6-
create (_, vnode) {
6+
create (_: any, vnode: VNodeWithData) {
77
registerRef(vnode)
88
},
9-
update (oldVnode, vnode) {
9+
update (oldVnode: VNodeWithData, vnode: VNodeWithData) {
1010
if (oldVnode.data.ref !== vnode.data.ref) {
1111
registerRef(oldVnode, true)
1212
registerRef(vnode)
1313
}
1414
},
15-
destroy (vnode) {
15+
destroy (vnode: VNodeWithData) {
1616
registerRef(vnode, true)
1717
}
1818
}

src/entries/web-compiler.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* @flow */
2+
13
import { extend } from 'shared/util'
24
import { compile as baseCompile, baseOptions } from 'web/compiler/index'
35
import { detectErrors } from 'compiler/error-detector'
@@ -12,9 +14,10 @@ export function compile (
1214
options = options || {}
1315
const errors = []
1416
// allow injecting modules/directives
17+
const baseModules = baseOptions.modules || []
1518
const modules = options.modules
16-
? baseOptions.modules.concat(options.modules)
17-
: baseOptions.modules
19+
? baseModules.concat(options.modules)
20+
: baseModules
1821
const directives = options.directives
1922
? extend(extend({}, baseOptions.directives), options.directives)
2023
: baseOptions.directives

src/platforms/web/runtime/modules/events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import { updateListeners } from 'core/vdom/helpers'
55

6-
function updateDOMListeners (oldVnode: VNodeWithData, vnode: VNodeWithData) {
6+
function updateDOMListeners (oldVnode, vnode) {
77
if (!oldVnode.data.on && !vnode.data.on) {
88
return
99
}

src/platforms/web/runtime/patch.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* @flow */
2+
13
import * as nodeOps from 'web/runtime/node-ops'
24
import { createPatchFunction } from 'core/vdom/patch'
35
import baseModules from 'core/vdom/modules/index'

src/platforms/web/runtime/transition-util.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* @flow */
2+
13
import { inBrowser } from 'core/util/index'
24
import { isIE9 } from 'web/util/index'
35
import { remove } from 'shared/util'
@@ -47,7 +49,7 @@ export function removeTransitionClass (el: any, cls: string) {
4749

4850
export function whenTransitionEnds (
4951
el: Element,
50-
expectedType: ?stirng,
52+
expectedType: ?string,
5153
cb: Function
5254
) {
5355
const { type, timeout, propCount } = getTransitionInfo(el, expectedType)
@@ -77,6 +79,7 @@ export function getTransitionInfo (el: Element, expectedType?: ?string): {
7779
type: ?string;
7880
propCount: number;
7981
timeout: number;
82+
hasTransform: boolean;
8083
} {
8184
const styles = window.getComputedStyle(el)
8285
const transitioneDelays = styles[transitionProp + 'Delay'].split(', ')

0 commit comments

Comments
 (0)