Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

literal

import { literal } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/comparable.ts";

Creates a Comparable that compares a union of literals using strict equality.

@example
import { literal } from "./comparable.ts";

const { compare } = literal(1, 2, "Three");

const result1 = compare(1)("Three"); // false
const result2 = compare("Three")("Three"); // true
function literal<A extends [Literal, ...Literal[]]>(..._: A): Comparable<A[number]>;
§
literal<A extends [Literal, ...Literal[]]>(..._: A): Comparable<A[number]>
[src]

§Type Parameters

§
A extends [Literal, ...Literal[]]
[src]

§Parameters

§
..._: A optional
[src]

§Return Type