deno.land / x / zod@v3.19.1 / __tests__ / void.test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// @ts-ignore TS6133import { expect } from "https://deno.land/x/expect@v0.2.6/mod.ts";const test = Deno.test;
import { util } from "../helpers/util.ts";import * as z from "../index.ts";test("void", () => { const v = z.void(); v.parse(undefined);
expect(() => v.parse(null)).toThrow(); expect(() => v.parse("")).toThrow();
type v = z.infer<typeof v>; util.assertEqual<v, void>(true);});
zod

Version Info

Tagged at
a year ago