Skip to content

Commit d55b9cb

Browse files
committed
Fix a few closure compiler issues
Fix spelling on some type annotations Remove documentation of unused `hasPath` argument for runComputedEffect Remove one spot calling runComputedEffect with unused `hasPath` argument
1 parent 084e479 commit d55b9cb

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

lib/mixins/property-effects.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ function runComputedEffects(inst, changedProps, oldProps, hasPaths) {
428428
}
429429
let info;
430430
while ((info = queue.shift())) {
431-
if (runComputedEffect(inst, '', changedProps, oldProps, info, hasPaths)) {
431+
if (runComputedEffect(inst, '', changedProps, oldProps, info)) {
432432
enqueueEffectsFor(info.methodInfo, computeEffects, queue, order, hasPaths);
433433
}
434434
}
@@ -452,9 +452,9 @@ function runComputedEffects(inst, changedProps, oldProps, hasPaths) {
452452
/**
453453
* Inserts a computed effect into a queue, given the specified order. Performs
454454
* the insert using a binary search.
455-
*
455+
*
456456
* Used by `orderedComputed: true` computed property algorithm.
457-
*
457+
*
458458
* @param {Object} info Property effects metadata
459459
* @param {Array<Object>} queue Ordered queue of effects
460460
* @param {Map<string,number>} order Map of computed property name->topological
@@ -466,7 +466,7 @@ const insertEffect = (info, queue, order) => {
466466
let idx = -1;
467467
while (start <= end) {
468468
const mid = (start + end) >> 1;
469-
// Note `methodInfo` is where the computed property name is stored in
469+
// Note `methodInfo` is where the computed property name is stored in
470470
// the effect metadata
471471
const cmp = order.get(queue[mid].methodInfo) - order.get(info.methodInfo);
472472
if (cmp < 0) {
@@ -487,14 +487,14 @@ const insertEffect = (info, queue, order) => {
487487
/**
488488
* Inserts all downstream computed effects invalidated by the specified property
489489
* into the topologically-sorted queue of effects to be run.
490-
*
490+
*
491491
* Used by `orderedComputed: true` computed property algorithm.
492-
*
492+
*
493493
* @param {string} prop Property name
494494
* @param {Object} computeEffects Computed effects for this element
495-
* @param {Array<Obbject>} queue Topologically-sorted queue of computed effects
495+
* @param {Array<Object>} queue Topologically-sorted queue of computed effects
496496
* to be run
497-
* @param {Map<string,numer>} order Map of computed property name->topological
497+
* @param {Map<string,number>} order Map of computed property name->topological
498498
* sort order
499499
* @param {boolean} hasPaths True with `changedProps` contains one or more paths
500500
*/
@@ -515,7 +515,7 @@ const enqueueEffectsFor = (prop, computeEffects, queue, order, hasPaths) => {
515515

516516
/**
517517
* Generates and retrieves a memoized map of computed property name to its
518-
* topologically-sorted order.
518+
* topologically-sorted order.
519519
*
520520
* The map is generated by first assigning a "dependency count" to each property
521521
* (defined as number properties it depends on, including its method for
@@ -531,8 +531,8 @@ const enqueueEffectsFor = (prop, computeEffects, queue, order, hasPaths) => {
531531
*
532532
* @param {!Polymer_PropertyEffects} inst The instance to retrieve the computed
533533
* effect order for.
534-
* @return {Map<string,numbber>} Map of computed property name->topological sort
535-
* order
534+
* @return {Map<string,number>} Map of computed property name->topological sort
535+
* order
536536
*/
537537
function getComputedOrder(inst) {
538538
let ordered = inst.constructor.__orderedComputedDeps;
@@ -579,8 +579,8 @@ function dependencyCounts(inst) {
579579
const counts = {};
580580
const ready = [];
581581
for (let p in props) {
582-
const info = infoForComputed[p];
583-
if (info) {
582+
const info = infoForComputed[p];
583+
if (info) {
584584
// Be sure to add the method name itself in case of "dynamic functions"
585585
counts[p] = info.args.length + (info.dynamicFn ? 1 : 0);
586586
} else {
@@ -600,7 +600,6 @@ function dependencyCounts(inst) {
600600
* @param {?Object} changedProps Bag of current property changes
601601
* @param {?Object} oldProps Bag of previous values for changed properties
602602
* @param {?} info Effect metadata
603-
* @param {boolean} hasPaths True with `changedProps` contains one or more paths
604603
* @return {boolean} True when the property being computed changed
605604
* @private
606605
*/
@@ -2438,7 +2437,7 @@ export const PropertyEffects = dedupingMixin(superClass => {
24382437
}
24392438
const info = createMethodEffect(this, sig, TYPES.COMPUTE, runComputedEffect, property, dynamicFn);
24402439
// Effects are normally stored as map of dependency->effect, but for
2441-
// ordered computation, we also need tree of computedProp->dependencies
2440+
// ordered computation, we also need tree of computedProp->dependencies
24422441
ensureOwnEffectMap(this, COMPUTE_INFO)[property] = info;
24432442
}
24442443

0 commit comments

Comments
 (0)