npp2ts

1.0.0 • Public • Published

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 env
const npp2ts = require('npp2ts');
 
// typescript env
import {npp2ts} from 'npp2ts';
 
// and just use it as a function that requires one parameter (-f)
const dts = npp2ts('protos.json');
// now `dts` includes all the definitions
 
// or with two parameters (-f and -o)
npp2ts('protos.json', 'protos.d.ts');

Readme

Keywords

none

Package Sidebar

Install

npm i npp2ts

Weekly Downloads

19

Version

1.0.0

License

none

Last publish

Collaborators

  • alizurchik