Skip to main content
Module

x/result_js/mod.ts>Ok

Minimum result type port of Rust
Latest
interface Ok
implements Container
import { type Ok } from "https://deno.land/x/result_js@2.0.0/mod.ts";

The Ok API.

Methods

getter
type(): ResultType.Ok
getter
get(): T
variable Ok
import { Ok } from "https://deno.land/x/result_js@2.0.0/mod.ts";

Ok constructor.

Examples

Example 1

import { Ok } from "https://deno.land/x/result_js/spec.ts";
const ok = Ok(0);