happy-rusty
    Preparing search index...

    Function isControlFlow

    • Checks if a value is a ControlFlow.

      Type Parameters

      • B

        The expected type of the break value contained within the ControlFlow.

      • C

        The expected type of the continue value contained within the ControlFlow.

      Parameters

      • cf: unknown

        The value to be checked as a ControlFlow.

      Returns cf is ControlFlow<B, C>

      true if the value is a ControlFlow, otherwise false.

      1.6.0

      const x = Break(5);
      console.log(isControlFlow(x)); // true
      console.log(isControlFlow(null)); // false
      console.log(isControlFlow({ isBreak: () => true })); // false