docs/libs/typescript.js
function containsMatchingReferenceDiscriminant(source, target) {
            return target.kind === 172 /* PropertyAccessExpression */ &&
                containsMatchingReference(source, target.expression) &&
                isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text);
        }
function containsMatchingReferenceDiscriminant(source, target) {
            return target.kind === 172 /* PropertyAccessExpression */ &&
                containsMatchingReference(source, target.expression) &&
                isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text);
        }
function containsMatchingReferenceDiscriminant ( source , target ) { return target . kind === 172 /* PropertyAccessExpression */ && containsMatchingReference ( source , target . expression ) && isDiscriminantProperty ( getDeclaredTypeOfReference ( target . expression ) , target . name . text ) ; }
Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property a possible discriminant if its type differs in the constituents of containing union type, and if every choice is a unit type or a union of unit types.
Return true if target is a property access xxx . yyy source is a property access xxx . zzz the declared type of xxx is a union type and yyy is a property that is possibly a discriminant . We consider a property a possible discriminant if its type differs in the constituents of containing union type and if every choice is a unit type or a union of unit types .