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

Function cast

test/fixtures/snapshot/typescript.js:1844–1848  ·  view source on GitHub ↗
(value, test)

Source from the content-addressed store, hash-verified

1842 }
1843 ts.tryCast = tryCast;
1844 function cast(value, test) {
1845 if (value !== undefined && test(value))
1846 return value;
1847 return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
1848 }
1849 ts.cast = cast;
1850 /** Does nothing. */
1851 function noop(_) { }

Callers 6

canonicalize_nameFunction · 0.50
parse_wheel_filenameFunction · 0.50
mac_platformsFunction · 0.50
parse_emailFunction · 0.50
__get__Method · 0.50

Calls 3

concatMethod · 0.80
testFunction · 0.70
failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…