import { and } from "https://deno.land/x/result_js@2.0.0/mod.ts";
Examples
Example 1
Example 1
import { and } from "https://deno.land/x/result_js/operators/logical.ts";
import { Err, Ok, type Result } from "https://deno.land/x/result_js/spec.ts";
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
declare const result: Result<unknown, unknown>;
assertEquals(and(Ok(0), result), result);
assertEquals(and(Err(1), result), Err(1));