MCPcopy Index your code
hub / github.com/Effect-TS/effect / not

Function not

packages/effect/src/internal/matcher.ts:485–503  ·  view source on GitHub ↗
(
  pattern: P,
  f: Fn
)

Source from the content-addressed store, hash-verified

483
484/** @internal */
485export const not = <
486 R,
487 const P extends Types.PatternPrimitive<R> | Types.PatternBase<R>,
488 Ret,
489 Fn extends (_: Types.NotMatch<R, P>) => Ret
490>(
491 pattern: P,
492 f: Fn
493) =>
494<I, F, A, Pr>(
495 self: Matcher<I, F, R, A, Pr, Ret>
496): Matcher<
497 I,
498 Types.AddOnly<F, Types.WhenMatch<R, P>>,
499 Types.ApplyFilters<I, Types.AddOnly<F, Types.WhenMatch<R, P>>>,
500 A | ReturnType<Fn>,
501 Pr,
502 Ret
503> => (self as any).add(makeNot(makePredicate(pattern), f as any))
504
505/** @internal */
506export const nonEmptyString: SafeRefinement<string, never> =

Callers

nothing calls this directly

Calls 3

makeNotFunction · 0.85
makePredicateFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected