MCPcopy Index your code
hub / github.com/nodejs/node / elaborateNeverIntersection

Function elaborateNeverIntersection

test/fixtures/snapshot/typescript.js:59382–59394  ·  view source on GitHub ↗
(errorInfo, type)

Source from the content-addressed store, hash-verified

59380 return !prop.valueDeclaration && !!(ts.getCheckFlags(prop) & 1024 /* CheckFlags.ContainsPrivate */);
59381 }
59382 function elaborateNeverIntersection(errorInfo, type) {
59383 if (type.flags & 2097152 /* TypeFlags.Intersection */ && ts.getObjectFlags(type) & 33554432 /* ObjectFlags.IsNeverIntersection */) {
59384 var neverProp = ts.find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);
59385 if (neverProp) {
59386 return ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString(type, /*enclosingDeclaration*/ undefined, 536870912 /* TypeFormatFlags.NoTypeReduction */), symbolToString(neverProp));
59387 }
59388 var privateProp = ts.find(getPropertiesOfUnionOrIntersectionType(type), isConflictingPrivateProperty);
59389 if (privateProp) {
59390 return ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, typeToString(type, /*enclosingDeclaration*/ undefined, 536870912 /* TypeFormatFlags.NoTypeReduction */), symbolToString(privateProp));
59391 }
59392 }
59393 return errorInfo;
59394 }
59395 /**
59396 * Return the symbol for the property with the given name in the given type. Creates synthetic union properties when
59397 * necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from

Callers 3

resolveBaseTypesOfClassFunction · 0.85
reportErrorResultsFunction · 0.85

Calls 4

typeToStringFunction · 0.85
symbolToStringFunction · 0.85
findMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…