@jenova-marie/ts-rust-result - v2.2.18
    Preparing search index...

    Function ok

    • Creates a successful result with the given value.

      Type Parameters

      • T

        The type of the value

      Parameters

      • value: T

        The value to wrap in a successful result

      Returns Result<T>

      A Result object representing success with the given value

      const result = ok("hello world")
      if (result.ok) {
      console.log(result.value) // "hello world"
      }