TypeScript to Protocol Buffers 🍭
Take a TypeScript:
export class User {
name?: string;
age?: number;
}
Run ts2proto:
npx @ts2proto/cli foo.ts
GET a Protocol Buffers:
syntax = "proto3";
message User {
optional string name = 0;
optional double age = 1;
}
MIT