Skip to main content
Go to Latest
import * as openbox from "https://deno.land/x/openbox@1.1.5/deps.ts";

Namespaces

Fast undefined check used for properties of type undefined

A registry for user defined string formats

Specialized Clone for Types

Compiles Types for Runtime Type Checking

Provides functions to test if JavaScript values are TypeBox types

A registry for user defined types

Functions to perform structural operations on JavaScript values

Provides functions to type guard raw JavaScript values

Functions

Make an assertion, error will be thrown if expr does not have truthy value.

Concatenate the given arrays into a new Uint8Array.

Check whether binary arrays are equal to each other.

Clears all user defined string formats

Deletes a registered format

Returns the entries in this registry

Gets a validation function for a user defined string format

Returns true if the user defined string format exists

Sets a validation function for a user defined string format

Returns the index of the first occurrence of the needle array in the source array, or -1 if it is not present.

Applies an intrinsic string manipulation to the given type.

Resolves an array of string[] keys from the given schema or array type.

Resolves an array of keys in this schema

Resolves a regular expression pattern matching all keys in this schema

Returns the index of the last occurrence of the needle array in the source array, or -1 if it is not present.

Returns true if the prefix array appears at the start of the source array, false otherwise.

Parses a pattern and returns an expression tree

Parses a pattern and strips forward and trailing ^ and $

Resolves a template literal as a TUnion

Clones a Rest

Clones a Type

Generates the code used to assert this type and returns it as a string

Compiles a TypeBox type for optimal runtime type checking. Types must be valid TypeBox types of TSchema

Returns true if the given value is TAny

Returns true if the given value is TArray

Returns true if the given value is TAsyncIterator

Returns true if the given value is TBigInt

Returns true if the given value is TBoolean

Returns true if the given value is TConstructor

Returns true if the given value is TDate

Returns true if the given value is TFunction

Returns true if the given value is TInteger

Returns true if the given value is TIntersect

Returns true if the given value is TIterator

Returns true if the given value is TKind

Returns true if the given value is a TKind with the given name.

Returns true if the given value is TLiteral

Returns true if the given value is TLiteral

Returns true if the given value is TLiteral

Returns true if the given value is TLiteral

Returns true if the given value is TNever

Returns true if the given value is TNot

Returns true if the given value is TNull

Returns true if the given value is TNumber

Returns true if the given value is TObject

Returns true if this value has a Optional symbol

Returns true if the given value is TPromise

Returns true if this value has a Readonly symbol

Returns true if the given value is TRecord

Returns true if this value is TRecursive

Returns true if the given value is TRef

Returns true if the given value is TSchema

Returns true if the given value is TString

Returns true if the given value is TSymbol

Returns true if the given value is TTemplateLiteral

Returns true if the given value is TThis

Returns true of this value is TTransform

Returns true if the given value is TTuple

Returns true if the given value is TUint8Array

Returns true if the given value is TUndefined

Returns true if the given value is TUnion

Returns true if the given value is TUnion<Literal<string | number>[]>

Returns true if the given value is TUnknown

Returns true if the given value is a raw TUnsafe

Returns true if the given value is TVoid

Clears all user defined types

Deletes a registered type

Returns the entries in this registry

Gets a custom validation function for a user defined type

Returns true if this registry contains this kind

Sets a validation function for a user defined type

Returns a resolved union with interior unions flattened

Casts a value into a given type. The return value will retain as much information of the original value as possible.

Returns true if the value matches the given type and references

Returns a structural clone of the given value

Converts any type mismatched values to their target type if a reasonable conversion is possible

Creates a value from the given type and references

Decodes a value or throws if error

Returns edits to transform the current value into the next value

Encodes a value or throws if error

Returns true if left and right values are structurally equal

Returns an iterator for each error in this value.

Returns a FNV1A-64 non cryptographic hash of the given value

Performs a deep mutable value assignment while retaining internal references.

Returns a new value with edits applied to the given value

Returns true if this value is an array

Returns true if this value is bigint

Returns true if this value is a boolean

Returns true if this value is null

Returns true if this value is number

Returns true if this value is an object

Returns true if this value is string

Returns true if this value is undefined

Type Aliases

Creates the static type for a TypeBox type

Creates the decoded static form for a TypeBox type

Creates the encoded static form for a TypeBox type