Skip to content

Commit

Permalink
Fix returned autorun problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava committed Nov 2, 2014
1 parent d0ad2ad commit 418e92d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions jsdocJson2ternjsJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ var O = {
};
var specialFunctionReturns = {
'Meteor.subscribe': 'MeteorSubscribeHandle',
'Tracker.autorun': 'Tracker.Computation',
'Blaze.TemplateInstance.prototype.autorun': 'Tracker.Computation'
'Tracker.autorun': '+Tracker.Computation',
'Blaze.TemplateInstance#autorun': '+Tracker.Computation'
};

var commonSkips = ['longname', 'kind', 'name', 'scope', 'memberof', 'options', 'instancename'];
Expand Down Expand Up @@ -78,7 +78,7 @@ attach['class'] = attach['function'] = function (fun) {
params = _.map(def, function (param) {
var name = processParamName(param);
var type = null;
if (! name.match(/\.\.\.\?$/) || ! name === 'thisArg?')
if (! name.match(/\.\.\.\?$/) && name !== 'thisArg?')
type = processParamType(param.type.names[0]); // XXX hardcoding first acceptable type
else
name = name.substr(0, name.length - 1);
Expand Down
5 changes: 2 additions & 3 deletions meteor.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
},
"autorun": {
"!doc": "Client\nA version of [Tracker.autorun](#tracker_autorun) that is stopped when the template is destroyed.",
"!type": "fn(runFunc: fn())"
"!type": "fn(runFunc: fn()) -> +Tracker.Computation"
}
},
"!doc": "The class for template instances",
Expand Down Expand Up @@ -584,7 +584,7 @@
},
"autorun": {
"!doc": "Client\nRun a function now and rerun it later whenever its dependencies change. Returns a Computation object that can be used to stop or observe the rerunning.",
"!type": "fn(runFunc: fn()) -> Tracker.Computation"
"!type": "fn(runFunc: fn()) -> +Tracker.Computation"
},
"nonreactive": {
"!doc": "Client\nRun a function without tracking dependencies.",
Expand Down Expand Up @@ -930,4 +930,3 @@
};
});


0 comments on commit 418e92d

Please sign in to comment.