Original project: https://github.com/mapbox/pbf
Changes:
- add typescript definition for runtime
- rewrite the compiler to get typescript output
CLI:
deno install --allow-read --allow-write --name pbf https://deno.land/x/pbf/cli.ts
pbf a.proto -o a.generated.ts
API:
import { SomeMessage } from "./a.generated.ts";
import { Pbf } from "https://deno.land/x/pbf/mod.ts";
const pbf = new Pbf();
const data = SomeMessage.write({ key: "value" }, pbf);