UNPKG

succulent

Version:

Powerful and easy runtime type checking

13 lines 401 B
/// <reference types="jest" /> import { assertType } from "../_util"; import { check, $any, $never, $string } from "../index"; test("check", () => { const value = "hi friend!"; expect(() => check(value, $any)).not.toThrow(); expect(() => check(value, $never)).toThrow(); function _(x) { check(x, $string); assertType(x); } }); //# sourceMappingURL=check.test.js.map