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.tspbf a.proto -o a.generated.tsAPI:
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);