Skip to main content
Module

x/typeguardkit/mod.ts>option

A TypeScript module to help construct type assertion functions and type guards.
Latest
function option
Re-export
import { option } from "https://deno.land/x/typeguardkit@0.32.1/mod.ts";

option can be used to create an OptionAsserter without specifying a typeName.

Example:

import { _string, option } from "typeguardkit";

export const _OptionalString = option(_string);

Type Parameters

DefinedTypeAsserter extends Asserter<unknown>

Parameters

definedTypeAsserter: DefinedTypeAsserter