mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
addressed CR feedback
This commit is contained in:
@@ -4379,8 +4379,8 @@ module ts {
|
||||
function getNarrowedTypeOfSymbol(symbol: Symbol, node: Node) {
|
||||
var type = getTypeOfSymbol(symbol);
|
||||
// Only narrow when symbol is variable of a structured type
|
||||
if (node && node.parent && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
|
||||
loop: while (true) {
|
||||
if (node && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
|
||||
loop: while (node.parent) {
|
||||
var child = node;
|
||||
node = node.parent;
|
||||
var narrowedType = type;
|
||||
|
||||
Reference in New Issue
Block a user