mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 04:17:34 -06:00
addressed CR feedback
This commit is contained in:
parent
08ab517d52
commit
ef6830054d
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user