(type)
| 66867 | } |
| 66868 | } |
| 66869 | function typeCouldHaveTopLevelSingletonTypes(type) { |
| 66870 | // Okay, yes, 'boolean' is a union of 'true | false', but that's not useful |
| 66871 | // in error reporting scenarios. If you need to use this function but that detail matters, |
| 66872 | // feel free to add a flag. |
| 66873 | if (type.flags & 16 /* TypeFlags.Boolean */) { |
| 66874 | return false; |
| 66875 | } |
| 66876 | if (type.flags & 3145728 /* TypeFlags.UnionOrIntersection */) { |
| 66877 | return !!ts.forEach(type.types, typeCouldHaveTopLevelSingletonTypes); |
| 66878 | } |
| 66879 | if (type.flags & 465829888 /* TypeFlags.Instantiable */) { |
| 66880 | var constraint = getConstraintOfType(type); |
| 66881 | if (constraint && constraint !== type) { |
| 66882 | return typeCouldHaveTopLevelSingletonTypes(constraint); |
| 66883 | } |
| 66884 | } |
| 66885 | return isUnitType(type) || !!(type.flags & 134217728 /* TypeFlags.TemplateLiteral */); |
| 66886 | } |
| 66887 | function getExactOptionalUnassignableProperties(source, target) { |
| 66888 | if (isTupleType(source) && isTupleType(target)) |
| 66889 | return ts.emptyArray; |
no test coverage detected
searching dependent graphs…