From 1647d20d90e0cc68a2714abeb7a1e81bb32c2b17 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 26 May 2016 16:50:36 -0700 Subject: [PATCH] Fix linting errors --- src/compiler/checker.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c14a7e26add..58aaae9f72b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7695,11 +7695,11 @@ namespace ts { getTypeAtFlowLoopLabel(flow); } else if (flow.flags & FlowFlags.Start) { - let container = (flow).container; + const container = (flow).container; if (container) { // If container is an IIFE continue with the control flow associated with the // call expression node. - let iife = getImmediatelyInvokedFunctionExpression(container); + const iife = getImmediatelyInvokedFunctionExpression(container); if (iife && iife.flowNode) { flow = iife.flowNode; continue; @@ -8086,16 +8086,6 @@ namespace ts { return expression; } - function getControlFlowContainer(node: Identifier, declarationContainer: Node, skipFunctionExpressions: boolean) { - let container = getContainingFunctionOrModule(node); - while (container !== declarationContainer && - (container.kind === SyntaxKind.FunctionExpression || container.kind === SyntaxKind.ArrowFunction) && - (skipFunctionExpressions || getImmediatelyInvokedFunctionExpression(container))) { - container = getContainingFunctionOrModule(container); - } - return container; - } - function isDeclarationIncludedInFlow(reference: Node, declaration: Declaration, includeOuterFunctions: boolean) { const declarationContainer = getContainingFunctionOrModule(declaration); let container = getContainingFunctionOrModule(reference);