Skip to main content
Module

x/typestruct/mod.ts>bigint

Composable and checkable JavaScript (and TypeScript) data structure
Latest
function bigint
import { bigint } from "https://deno.land/x/typestruct@1.0.0-beta.5/mod.ts";

Create bigint data type struct.

Examples

Example 1

import { bigint, is } from "https://deno.land/x/typestruct@$VERSION/mod.ts";
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts";

assertEquals(is(bigint(), 0), true);
assertEquals(is(bigint(), 0n), false);

Parameters

optional
message: string | Messenger<DataTypeContext>

Custom issue message.

Returns

Struct<unknown, bigint>