(unionType, keyType)
| 69505 | // Given a union type for which getKeyPropertyName returned a non-undefined result, return the constituent |
| 69506 | // that corresponds to the given key type for that property name. |
| 69507 | function getConstituentTypeForKeyType(unionType, keyType) { |
| 69508 | var _a; |
| 69509 | var result = (_a = unionType.constituentMap) === null || _a === void 0 ? void 0 : _a.get(getTypeId(getRegularTypeOfLiteralType(keyType))); |
| 69510 | return result !== unknownType ? result : undefined; |
| 69511 | } |
| 69512 | function getMatchingUnionConstituentForType(unionType, type) { |
| 69513 | var keyPropertyName = getKeyPropertyName(unionType); |
| 69514 | var propType = keyPropertyName && getTypeOfPropertyOfType(type, keyPropertyName); |
no test coverage detected
searching dependent graphs…