Skip to main content
Deno 2 is finally here 🎉️
Learn more
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.33.0/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