From fbe4246d39d2f001160948855b61a492094d44fd Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Wed, 15 Jul 2015 16:36:54 -0700 Subject: [PATCH] Remove resolveLocation --- src/compiler/checker.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 007edacadc9..d0c5667a340 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5841,32 +5841,15 @@ namespace ts { } } - function resolveLocation(node: Node) { - // Resolve location from top down towards node if it is a context sensitive expression - // That helps in making sure not assigning types as any when resolved out of order - let containerNodes: Node[] = []; - for (let parent = node.parent; parent; parent = parent.parent) { - if ((isExpression(parent) || isObjectLiteralMethod(node)) && - isContextSensitive(parent)) { - containerNodes.unshift(parent); - } - } - - ts.forEach(containerNodes, node => { getTypeOfNode(node); }); - } - function getSymbolAtLocation(node: Node): Symbol { - resolveLocation(node); return getSymbolInfo(node); } function getTypeAtLocation(node: Node): Type { - resolveLocation(node); return getTypeOfNode(node); } function getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type { - resolveLocation(node); // Get the narrowed type of symbol at given location instead of just getting // the type of the symbol. // eg.