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

Showable

import type { Showable } from "https://raw.githubusercontent.com/baetheus/fun/main/showable.ts";

A Showable structure has the method show, which converts a value to a string representation. This interface extends Hold to ensure type safety and consistency with other algebraic structures in the library.

@example
import * as S from "./showable.ts";

const ShowableNumber: S.Showable<number> = {
  show: (n: number) => n.toString()
};

const result = ShowableNumber.show(42); // "42"
interface Showable <U> extends Hold<U> {
readonly show: (value: U) => string;
}

§Type Parameters

§Extends

§Properties

§
readonly show: (value: U) => string
[src]