Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/typebox/src/typebox.ts>JsonTypeBuilder#Extract

Json Schema Type Builder with Static Type Resolution for TypeScript
Go to Latest
method JsonTypeBuilder.prototype.Extract
import { JsonTypeBuilder } from "https://deno.land/x/typebox@0.31.20/src/typebox.ts";

[Json] Constructs a type by extracting from type all union members that are assignable to union

Type Parameters

L extends TSchema
R extends TSchema

Parameters

type: L
union: R
optional
options: SchemaOptions = [UNSUPPORTED]