Skip to content
/ npp2ts Public

Typescript definitions generator for "node-pogo-protos"

License

Notifications You must be signed in to change notification settings

likerRr/npp2ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npp2ts

Typescript definitions generator for node-pogo-protos (while it utilizes 5th version of protobuf)

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');

About

Typescript definitions generator for "node-pogo-protos"

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published