Skip to content

Commit db3c953

Browse files
Fix lint issues
1 parent e9b488f commit db3c953

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,9 @@ export abstract class ReflectionObject {
909909
/** Resolved Features. */
910910
public _features: object;
911911

912+
/** Whether or not features have been resolved. */
913+
public _featuresResolved: boolean;
914+
912915
/** Parent namespace. */
913916
public parent: (Namespace|null);
914917

src/namespace.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChe
385385
if (this.parent === null || parentAlreadyChecked)
386386
return null;
387387
return this.parent.lookup(path, filterTypes);
388-
}
388+
};
389389

390390
/**
391391
* Internal helper for lookup that handles searching just at this namespace and below along with caching.
@@ -395,29 +395,29 @@ Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChe
395395
*/
396396
Namespace.prototype._lookupImpl = function lookup(path) {
397397
var flatPath = path.join(".");
398-
if(this._lookupCache.hasOwnProperty(flatPath)) {
398+
if(Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
399399
return this._lookupCache[flatPath];
400-
} else {
401-
// Test if the first part matches any nested object, and if so, traverse if path contains more
402-
var found = this.get(path[0]);
403-
var exact = null;
404-
if (found) {
405-
if (path.length === 1) {
406-
exact = found;
407-
} else if (found instanceof Namespace && (found = found._lookupImpl(path.slice(1))))
408-
exact = found;
400+
}
409401

410-
// Otherwise try each nested namespace
411-
} else {
412-
for (var i = 0; i < this.nestedArray.length; ++i)
413-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path)))
414-
exact = found;
415-
}
402+
// Test if the first part matches any nested object, and if so, traverse if path contains more
403+
var found = this.get(path[0]);
404+
var exact = null;
405+
if (found) {
406+
if (path.length === 1) {
407+
exact = found;
408+
} else if (found instanceof Namespace && (found = found._lookupImpl(path.slice(1))))
409+
exact = found;
416410

417-
// Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.
418-
this._lookupCache[flatPath] = exact;
419-
return exact;
411+
// Otherwise try each nested namespace
412+
} else {
413+
for (var i = 0; i < this.nestedArray.length; ++i)
414+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path)))
415+
exact = found;
420416
}
417+
418+
// Set this even when null, so that when we walk up the tree we can quickly bail on repeated checks back down.
419+
this._lookupCache[flatPath] = exact;
420+
return exact;
421421
};
422422

423423
/**

src/object.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function ReflectionObject(name, options) {
7070
/**
7171
* Whether or not features have been resolved.
7272
* @type {boolean}
73-
* /
73+
*/
7474
this._featuresResolved = false;
7575

7676
/**

0 commit comments

Comments
 (0)