main
@doomhowl/protovalidate-throw
TypeScript helpers that create Buf protobuf messages and throw when they fail Protovalidate validation.
Usage
import { createValid } from "@doomhowl/protovalidate-throw";
import { UserSchema } from "./gen/user_pb";
const user = createValid(UserSchema, { name: "Ada" });
createValid returns the created message when valid and throws the validation
error otherwise. ensureValidMessage validates an existing message.
Development
npm install
npm run build
npm run pack:check
Languages
TypeScript
100%