npp2ts
Typescript definitions generator for node-pogo-protos
Install
npm install npp2ts
or
npm install npp2ts --global
for access from anywhere in your system
Usage:
npp2ts -f protos.json -o protos.d.t.s
or
npp2ts -f protos.json
Where:
-f
- Input file model generated by pbjs
-o
- Output file with definitions. If not provided the buffer will be flushed
You can also import a module inside your javascript:
// node envconst npp2ts = ; // typescript env; // and just use it as a function that requires one parameter (-f)const dts = ;// now `dts` includes all the definitions // or with two parameters (-f and -o);