1.1.0 • Published 6 years ago

p2ts v1.1.0

Weekly downloads
2
License
ISC
Repository
-
Last release
6 years ago

Generate Typescript from Proto definition

Installation

npm install p2ts --global

Usage

p2ts /path/to/definition.proto /output/path/for.ts [NamespaceName]

What it does

Converts a proto definition file like:

	
message SomeMessage {
	int32 int_prop = 1;
	repeated string string_array_prop = 2;
	CustomType custom_type_prop = 3;
}

message CustomType {
	bool bool_prop = 1;
}

to

export namespace NamespaceName {

	export interface SomeMessage {
		int_prop: number;
		string_array_prop: string[];
		custom_type_prop: CustomType;
	}

	export interface CustomType {
		bool_prop: boolean;
	}

}
1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago