* A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures
(type)
| 66946 | * and no required properties, call/construct signatures or index signatures |
| 66947 | */ |
| 66948 | function isWeakType(type) { |
| 66949 | if (type.flags & 524288 /* TypeFlags.Object */) { |
| 66950 | var resolved = resolveStructuredTypeMembers(type); |
| 66951 | return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 && resolved.indexInfos.length === 0 && |
| 66952 | resolved.properties.length > 0 && ts.every(resolved.properties, function (p) { return !!(p.flags & 16777216 /* SymbolFlags.Optional */); }); |
| 66953 | } |
| 66954 | if (type.flags & 2097152 /* TypeFlags.Intersection */) { |
| 66955 | return ts.every(type.types, isWeakType); |
| 66956 | } |
| 66957 | return false; |
| 66958 | } |
| 66959 | function hasCommonProperties(source, target, isComparingJsxAttributes) { |
| 66960 | for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) { |
| 66961 | var prop = _a[_i]; |
no test coverage detected
searching dependent graphs…