Skip to main content
Module

x/fun/newtype.ts>From

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
type alias From
import { type From } from "https://deno.land/x/fun@v2.0.0-alpha.6/newtype.ts";

Extracts the inner type value from a Newtype.

Examples

Example 1

import type { Newtype, From } from "./newtype.ts";

type Integer = Newtype<'Integer', number>;

type InnerInteger = From<Integer>; // number
definition: T extends Newtype<infer _, infer A> ? A : never