mapbox / pbf

A low-level, lightweight protocol buffers implementation in JavaScript.
BSD 3-Clause "New" or "Revised" License
801 stars 107 forks source link

Generate typescript declarations #111

Open Timmmm opened 5 years ago

Timmmm commented 5 years ago

It would be nice if this generated typescript type declarations corresponding to the generated Javascript code.

Or even better, just have a --typescript mode that generates Typescript in the first place.

mourner commented 5 years ago

Yep! Can you give #107 a try?

rubick24 commented 2 months ago

https://github.com/rubick24/pbf-compile-ts I tinkered compile.js a little bit to make it support typescript in my case, but I think it would be better to use Babel to generate ASTs and then output formatted code.