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

Function isTypeComparableTo

test/fixtures/snapshot/typescript.js:63871–63873  ·  view source on GitHub ↗

* This is *not* a bi-directional relationship. * If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'. * * A type S is comparable to a type T if some (but not necessarily all) of the possible values of S are

(source, target)

Source from the content-addressed store, hash-verified

63869 * - the type of an expression in a type assertion with the type being asserted.
63870 */
63871 function isTypeComparableTo(source, target) {
63872 return isTypeRelatedTo(source, target, comparableRelation);
63873 }
63874 function areTypesComparable(type1, type2) {
63875 return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1);
63876 }

Callers 5

areTypesComparableFunction · 0.85
narrowTypeByDiscriminantFunction · 0.85
checkAssertionWorkerFunction · 0.85

Calls 1

isTypeRelatedToFunction · 0.85

Tested by

no test coverage detected