import { TypeAsserter } from "https://deno.land/x/typeguardkit@0.33.0/mod.ts";
A TypeAsserter<Type>
is an Asserter<Type>
that uses typeGuard
to assert
whether value
is of Type
.
Example:
import { TypeAsserter } from "typeguardkit";
export const _string = new TypeAsserter(
"string",
(value): value is string => typeof value === "string",
);
Constructors
new
TypeAsserter(typeName: string, typeGuard: (value: unknown) => value is Type)