Variable guardsConst

guards: {
    and: (<const G>(...guards: Definition.Guard<G>[]) => And<G>);
    not: (<const G>(guard: Definition.Guard<G>) => Not<G>);
    or: (<const G>(...guards: Definition.Guard<G>[]) => Or<G>);
} = ...

Type declaration

  • and: (<const G>(...guards: Definition.Guard<G>[]) => And<G>)
      • <const G>(...guards): And<G>
      • Combines multiple guards into a single guard using the logical && operator.

        Type Parameters

        • const G extends string

          The type of the guard.

        Parameters

        Returns And<G>

        The combined guard.

  • not: (<const G>(guard: Definition.Guard<G>) => Not<G>)
      • <const G>(guard): Not<G>
      • Inverts the boolean value returned by the guard function.

        Type Parameters

        • const G extends string

          The type of the guard.

        Parameters

        Returns Not<G>

        The inverted guard.

  • or: (<const G>(...guards: Definition.Guard<G>[]) => Or<G>)
      • <const G>(...guards): Or<G>
      • Combines multiple guards into a single guard using the logical || operator.

        Type Parameters

        • const G extends string

          The type of the guard.

        Parameters

        Returns Or<G>

        The combined guard.