aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/language/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tslint/lib/language/utils.js')
-rw-r--r--node_modules/tslint/lib/language/utils.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/tslint/lib/language/utils.js b/node_modules/tslint/lib/language/utils.js
index 30983ec6b..e9ba81a48 100644
--- a/node_modules/tslint/lib/language/utils.js
+++ b/node_modules/tslint/lib/language/utils.js
@@ -64,13 +64,13 @@ exports.isBlockScopedVariable = isBlockScopedVariable;
function isBlockScopedBindingElement(node) {
var variableDeclaration = getBindingElementVariableDeclaration(node);
// if no variable declaration, it must be a function param, which is block scoped
- return (variableDeclaration == null) || isBlockScopedVariable(variableDeclaration);
+ return (variableDeclaration === null) || isBlockScopedVariable(variableDeclaration);
}
exports.isBlockScopedBindingElement = isBlockScopedBindingElement;
function getBindingElementVariableDeclaration(node) {
var currentParent = node.parent;
while (currentParent.kind !== ts.SyntaxKind.VariableDeclaration) {
- if (currentParent.parent == null) {
+ if (currentParent.parent === undefined) {
return null; // function parameter, no variable declaration
}
else {
@@ -92,7 +92,7 @@ exports.childOfKind = childOfKind;
* @returns true if some ancestor of `node` satisfies `predicate`, including `node` itself.
*/
function someAncestor(node, predicate) {
- return predicate(node) || (node.parent != null && someAncestor(node.parent, predicate));
+ return predicate(node) || (node.parent !== undefined && someAncestor(node.parent, predicate));
}
exports.someAncestor = someAncestor;
function ancestorWhere(node, predicate) {