Skip to main content
Module

x/typestruct/mod.ts>symbol

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

Create symbol data type struct.

Examples

Example 1

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

assertEquals(is(symbol(), Symbol.iterator), true);
assertEquals(is(symbol(), {}), false);

Parameters

optional
message: string | Messenger<DataTypeContext>

Custom issue message.

Returns

Struct<unknown, symbol>