Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/actionify/src/deps/types.ts>Brander

Create and manage your GitHub workflows with TypeScript and Deno.
Latest
type alias Brander
import { type Brander } from "https://deno.land/x/actionify@0.3.0/src/deps/types.ts";

A Brander is a function that takes a value of some base type and casts that value to a branded type derived from said base type. It can be thought of as the type of a "constructor", in the functional programming sense of the word.

Examples

Example 1

type UserId = Brand<number, 'user'>;
// A Brander<UserId> would take a number and return a UserId
definition: (underlying: BaseOf<B>) => B