(expr, computedType)
| 70785 | return undefined; |
| 70786 | } |
| 70787 | function getDiscriminantPropertyAccess(expr, computedType) { |
| 70788 | var type = declaredType.flags & 1048576 /* TypeFlags.Union */ ? declaredType : computedType; |
| 70789 | if (type.flags & 1048576 /* TypeFlags.Union */) { |
| 70790 | var access = getCandidateDiscriminantPropertyAccess(expr); |
| 70791 | if (access) { |
| 70792 | var name = getAccessedPropertyName(access); |
| 70793 | if (name && isDiscriminantProperty(type, name)) { |
| 70794 | return access; |
| 70795 | } |
| 70796 | } |
| 70797 | } |
| 70798 | return undefined; |
| 70799 | } |
| 70800 | function narrowTypeByDiscriminant(type, access, narrowType) { |
| 70801 | var propName = getAccessedPropertyName(access); |
| 70802 | if (propName === undefined) { |
no test coverage detected
searching dependent graphs…