@pleisto/active-support
    Preparing search index...

    Function not

    • P.not(pattern) returns a pattern which matches if the sub pattern doesn't match.

      Read the documentation for P.not on GitHub

      Type Parameters

      • input
      • const pattern extends
            | undefined
            | null
            | string
            | number
            | bigint
            | boolean
            | symbol
            | readonly []
            | readonly [unknown, unknown]
            | readonly [unknown, unknown]
            | UnknownProperties
            | UnknownMatcher
            | readonly UnknownPattern[]
            | readonly [UnknownPattern, UnknownPattern]
            | readonly [UnknownPattern, UnknownPattern]
            | PatternMatcher<input>
            | {
                readonly [k in string | number | symbol]?: Pattern.Pattern<
                    Readonly<
                        MergeUnion<
                            Exclude<
                                input,
                                readonly any[]
                                | Primitives
                                | Map<any, any>
                                | Set<any>,
                            >,
                        >,
                    >[k],
                >
            }

      Parameters

      Returns Chainable<NotP<input, pattern>>

      match<{ a: string | number }>(value)
      .with({ a: P.not(P.string) }, (x) => 'will match { a: number }'
      )