@allynet/ishod
    Preparing search index...

    Function isOk

    • Used to check if a result is an Ok.

      Type Parameters

      • T
      • E

      Parameters

      Returns result is Ok<T>

      const result: Result<number, string> = ok(1);
      const isOkResult: boolean = isOk(result); // true
      if (isOk(result)) {
      // We now know that the result is an Ok
      // so we can safely use it
      const value: number = unwrap(result); // 1
      }