MCPcopy
hub / github.com/gvergnaud/ts-pattern / negative

Function negative

src/patterns.ts:1047–1048  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1045 * .with(P.number.negative(), () => 'number < 0')
1046 */
1047const negative = <input>(): GuardExcludeP<input, number, never> =>
1048 when((value) => isNumber(value) && value < 0);
1049
1050const numberChainable = <pattern extends Matcher<any, any, any, any, any>>(
1051 pattern: pattern

Callers 1

numberChainableFunction · 0.85

Calls 2

whenFunction · 0.85
isNumberFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…