MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / rangeError

Function rangeError

src/compute-engine/library/distributions.ts:56–58  ·  view source on GitHub ↗

Build an out-of-range error node for a bad literal parameter.

(ce: ComputeEngine, expected: string, x: Expression)

Source from the content-addressed store, hash-verified

54 if (isNumber(x) && x.im === 0 && x.isFinite === true) return x.re;
55 return undefined;
56}
57
58/** Build an out-of-range error node for a bad literal parameter. */
59function rangeError(ce: ComputeEngine, expected: string, x: Expression) {
60 return ce.error(['out-of-range', expected, x.toString()]);
61}

Callers 1

distributions.tsFile · 0.85

Calls 2

errorMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected