Converts into an array.
The array which contains zero or one success element.
import { err, ok, toArray } from "./result.ts";import { assertEquals } from "../deps.ts";assertEquals(toArray(ok(24)), [24]);assertEquals(toArray(err("hoge")), []); Copy
import { err, ok, toArray } from "./result.ts";import { assertEquals } from "../deps.ts";assertEquals(toArray(ok(24)), [24]);assertEquals(toArray(err("hoge")), []);
Generated using TypeDoc
Converts into an array.