ow
Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T1: object

  • T2

Hierarchy

  • Predicate<WeakMap<T1, T2>>
    • WeakMapPredicate

Implements

  • BasePredicate<WeakMap<T1, T2>>

Index

Accessors

Methods

Accessors

not

not:

Invert the following validators.

Methods

hasAnyKeys

  • hasAnyKeys(...keys: T1[]): this
  • Test a WeakMap to include any of the provided keys. The keys are tested by identity, not structure.

    Parameters

    • Rest ...keys: T1[]

      The keys that could be a key in the WeakMap.

    Returns this

hasKeys

  • hasKeys(...keys: T1[]): this
  • Test a WeakMap to include all the provided keys. The keys are tested by identity, not structure.

    Parameters

    • Rest ...keys: T1[]

      The keys that should be a key in the WeakMap.

    Returns this

is

  • is(fn: function): this
  • Test if the value matches a custom validation function. The validation function should return true if the value passes the function. If the function either returns false or a string, the function fails and the string will be used as error message.

    Parameters

    • fn: function

      Validation function.

        • (value: WeakMap<T1, T2>): boolean | string
        • Parameters

          • value: WeakMap<T1, T2>

          Returns boolean | string

    Returns this