-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Feature description:
Introduce TypeScript support to the protovalidate library for performing runtime validation of Protocol Buffers messages in TypeScript projects. This was a feature request in protovalidates predecessor bufbuild/protoc-gen-validate#71
Problem it solves or use case:
The absence of TypeScript support in the protovalidate library hinders developers who work with Protocol Buffers and TypeScript. By adding TypeScript support, developers would be able to validate Protocol Buffers messages at runtime within their TypeScript applications, enhancing data integrity and reducing potential bugs related to data validation.
Proposed implementation or solution:
The proposed solution involves extending the existing protovalidate library to include TypeScript bindings and support. This includes defining TypeScript type definitions that correspond to Protocol Buffers message structures, and implementing runtime validation functions that work seamlessly with TypeScript types.
Contribution:
I am willing to contribute to this feature request by actively participating in discussions, assisting in defining TypeScript type definitions, and collaborating on the implementation of runtime validation functions for TypeScript. If necessary, I can also assist in writing tests and documentation to ensure the feature is thoroughly covered and well-documented.
Examples or references:
While protovalidate doesn't currently have TypeScript support, similar libraries like protobufjs and protobuf-ts provide inspiration for how TypeScript bindings and runtime validation can be integrated for Protocol Buffers messages in a type-safe manner.
Additional context:
Enabling TypeScript support in the protovalidate library would bridge the gap for developers who use Protocol Buffers in TypeScript projects, allowing them to perform runtime validation without relying on separate code generation processes. This aligns with the trend of utilizing TypeScript's strong typing and safety features in modern software development.