(type, expr, assumePresent)
| 71386 | return type; |
| 71387 | } |
| 71388 | function narrowTypeByOptionality(type, expr, assumePresent) { |
| 71389 | if (isMatchingReference(reference, expr)) { |
| 71390 | return getTypeWithFacts(type, assumePresent ? 2097152 /* TypeFacts.NEUndefinedOrNull */ : 262144 /* TypeFacts.EQUndefinedOrNull */); |
| 71391 | } |
| 71392 | var access = getDiscriminantPropertyAccess(expr, type); |
| 71393 | if (access) { |
| 71394 | return narrowTypeByDiscriminant(type, access, function (t) { return getTypeWithFacts(t, assumePresent ? 2097152 /* TypeFacts.NEUndefinedOrNull */ : 262144 /* TypeFacts.EQUndefinedOrNull */); }); |
| 71395 | } |
| 71396 | return type; |
| 71397 | } |
| 71398 | } |
| 71399 | function getTypeOfSymbolAtLocation(symbol, location) { |
| 71400 | symbol = symbol.exportSymbol || symbol; |
no test coverage detected
searching dependent graphs…