UNPKG

typia

Version:

Superfast runtime validators with only one line

11 lines (9 loc) 257 B
import { TypeGuardError } from "../TypeGuardError"; export const $throws = (method: string) => (props: Pick<TypeGuardError.IProps, "expected" | "value">) => { throw new TypeGuardError({ ...props, method: `typia.${method}`, }); };