diff --git a/src/Control.ts b/src/Utils.ts similarity index 93% rename from src/Control.ts rename to src/Utils.ts index 4cc4d86fb..e0ca67e9c 100644 --- a/src/Control.ts +++ b/src/Utils.ts @@ -2,7 +2,7 @@ * Control flow functions. */ /* tslint:disable:no-increment-decrement */ -module Control { +module Utils { /** * Logical 'any' or 'exists' function. @@ -22,4 +22,4 @@ module Control { } /* tslint:enable:no-increment-decrement */ -export = Control; \ No newline at end of file +export = Utils; \ No newline at end of file diff --git a/src/exportNameRule.ts b/src/exportNameRule.ts index df01e9804..f6b40df77 100644 --- a/src/exportNameRule.ts +++ b/src/exportNameRule.ts @@ -1,6 +1,6 @@ import ErrorTolerantWalker = require('./ErrorTolerantWalker'); -import Control = require('./Control'); +import Utils = require('./Utils'); /** * Implementation of the export-name rule. @@ -50,7 +50,7 @@ class ExportNameWalker extends ErrorTolerantWalker { private isSuppressed(exportedName: string) : boolean { var allExceptions : string[] = Rule.getExceptions(this.getOptions()); - return Control.exists(allExceptions, (exception: string) : boolean => { + return Utils.exists(allExceptions, (exception: string) : boolean => { return new RegExp(exception).test(exportedName); }); } diff --git a/src/jqueryDeferredMustCompleteRule.ts b/src/jqueryDeferredMustCompleteRule.ts index 4a1432b4e..ec7f06c75 100644 --- a/src/jqueryDeferredMustCompleteRule.ts +++ b/src/jqueryDeferredMustCompleteRule.ts @@ -1,6 +1,6 @@ import ErrorTolerantWalker = require('./ErrorTolerantWalker'); import AstUtils = require('./AstUtils'); -import Control = require('./Control'); +import Utils = require('./Utils'); /** * Implementation of the jquery-deferred-must-complete rule. @@ -132,7 +132,7 @@ class DeferredCompletionWalker extends ErrorTolerantWalker { } } - let referenceEscaped : boolean = Control.exists(node.arguments, (argument: ts.Expression) : boolean => { + let referenceEscaped : boolean = Utils.exists(node.arguments, (argument: ts.Expression) : boolean => { return AstUtils.isSameIdentifer(this.deferredIdentifier, argument); }); if (referenceEscaped) { @@ -144,7 +144,7 @@ class DeferredCompletionWalker extends ErrorTolerantWalker { protected visitArrowFunction(node: ts.FunctionLikeDeclaration): void { - var isDeferredShadowed : boolean = Control.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => { + var isDeferredShadowed : boolean = Utils.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => { return AstUtils.isSameIdentifer(this.deferredIdentifier, param.name); }); if (isDeferredShadowed) { @@ -156,7 +156,7 @@ class DeferredCompletionWalker extends ErrorTolerantWalker { } protected visitFunctionExpression(node: ts.FunctionExpression): void { - var isDeferredShadowed : boolean = Control.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => { + var isDeferredShadowed : boolean = Utils.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => { return AstUtils.isSameIdentifer(this.deferredIdentifier, param.name); }); if (isDeferredShadowed) { diff --git a/src/noHttpStringRule.ts b/src/noHttpStringRule.ts index ec9a0cd6d..788ed69a0 100644 --- a/src/noHttpStringRule.ts +++ b/src/noHttpStringRule.ts @@ -1,5 +1,5 @@ import ErrorTolerantWalker = require('./ErrorTolerantWalker'); -import Control = require('./Control'); +import Utils = require('./Utils'); /** * Implementation of the no-http-string rule. @@ -31,7 +31,7 @@ class NoHttpStringWalker extends ErrorTolerantWalker { private isSuppressed(stringText: string) : boolean { var allExceptions : string[] = NoHttpStringWalker.getExceptions(this.getOptions()); - return Control.exists(allExceptions, (exception: string) : boolean => { + return Utils.exists(allExceptions, (exception: string) : boolean => { return new RegExp(exception).test(stringText); }); }