Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/ahh/src/option.ts>unzip

Opinionated idiomatic features for TypeScript.
Latest
function unzip
import { unzip } from "https://deno.land/x/ahh@v0.14.0/src/option.ts";

Returns the values of option as a tuple of Options.

Examples

Example 1

import { assertArrayIncludes } from "../test_deps.ts";
import O from "./option.ts";

const unzipped = O.unzip([2, 4]);

assertArrayIncludes(unzipped, [2, 4]);

Type Parameters

T extends Some<unknown>
U extends Some<unknown>

Parameters

option: Option<[T, U]>