Skip to content

Commit 6ff1290

Browse files
committed
Merge pull request #2515 from kazupon/improve/comments
update internal explain comments
2 parents b80ae34 + 63934ac commit 6ff1290

File tree

7 files changed

+17
-12
lines changed

7 files changed

+17
-12
lines changed

src/directive.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@ function noop () {}
2020
* It registers a watcher with the expression and calls
2121
* the DOM update function when a change is triggered.
2222
*
23-
* @param {String} name
24-
* @param {Node} el
25-
* @param {Vue} vm
2623
* @param {Object} descriptor
2724
* - {String} name
2825
* - {Object} def
2926
* - {String} expression
3027
* - {Array<Object>} [filters]
28+
* - {Object} [modifiers]
3129
* - {Boolean} literal
3230
* - {String} attr
31+
* - {String} arg
3332
* - {String} raw
34-
* @param {Object} def - directive definition object
33+
* - {String} [ref]
34+
* - {Array<Object>} [interp]
35+
* - {Boolean} [hasOneTime]
36+
* @param {Vue} vm
37+
* @param {Node} el
3538
* @param {Vue} [host] - transclusion host component
3639
* @param {Object} [scope] - v-for scope
3740
* @param {Fragment} [frag] - owner fragment
@@ -68,8 +71,6 @@ export default function Directive (descriptor, vm, el, host, scope, frag) {
6871
* Initialize the directive, mixin definition properties,
6972
* setup the watcher, call definition bind() and update()
7073
* if present.
71-
*
72-
* @param {Object} def
7374
*/
7475

7576
Directive.prototype._bind = function () {

src/fragment/fragment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
* @param {DocumentFragment} frag
2222
* @param {Vue} [host]
2323
* @param {Object} [scope]
24+
* @param {Fragment} [parentFrag]
2425
*/
2526

2627
export default function Fragment (linker, vm, frag, host, scope, parentFrag) {

src/instance/api/lifecycle.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export default function (Vue) {
4747
/**
4848
* Teardown the instance, simply delegate to the internal
4949
* _destroy.
50+
*
51+
* @param {Boolean} remove
52+
* @param {Boolean} deferCleanup
5053
*/
5154

5255
Vue.prototype.$destroy = function (remove, deferCleanup) {
@@ -59,6 +62,8 @@ export default function (Vue) {
5962
*
6063
* @param {Element|DocumentFragment} el
6164
* @param {Vue} [host]
65+
* @param {Object} [scope]
66+
* @param {Fragment} [frag]
6267
* @return {Function}
6368
*/
6469

src/instance/internal/lifecycle.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,8 @@ export default function (Vue) {
135135
/**
136136
* Create and bind a directive to an element.
137137
*
138-
* @param {String} name - directive name
138+
* @param {Object} descriptor - parsed directive descriptor
139139
* @param {Node} node - target node
140-
* @param {Object} desc - parsed directive descriptor
141-
* @param {Object} def - directive definition object
142140
* @param {Vue} [host] - transclusion host component
143141
* @param {Object} [scope] - v-for scope
144142
* @param {Fragment} [frag] - owner fragment

src/observer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Observer.prototype.removeVm = function (vm) {
108108
* the prototype chain using __proto__
109109
*
110110
* @param {Object|Array} target
111-
* @param {Object} proto
111+
* @param {Object} src
112112
*/
113113

114114
function protoAugment (target, src) {

src/parsers/directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function processFilterArg (arg) {
7171
* ]
7272
* }
7373
*
74-
* @param {String} str
74+
* @param {String} s
7575
* @return {Object}
7676
*/
7777

src/watcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let uid = 0
1818
* This is used for both the $watch() api and directives.
1919
*
2020
* @param {Vue} vm
21-
* @param {String} expression
21+
* @param {String|Function} expOrFn
2222
* @param {Function} cb
2323
* @param {Object} options
2424
* - {Array} filters

0 commit comments

Comments
 (0)