protobuf.js version: 6.8.0
First, let me say thanks for improving the generated typings between 6.7.3 and 6.8.0! The only issue I see now is the generated typings don't include enum definitions.
I'm generating static ES6 module from the proto file with pbjs, then generating typings with pbts this way:
$ pbjs -t static-module -w es6 -o ./vgraph.js ./vgraph.proto
$ pbts -o ./vgraph.d.ts ./vgraph.js
Here's a repro:
// vgraph.proto
message VectorGraph {
enum GraphType {
UNDIRECTED = 0;
DIRECTED = 1;
}
enum AttributeTarget {
VERTEX = 0;
EDGE = 1;
}
}
generated:
// vgraph.d.ts
import * as $protobuf from "protobufjs";
export interface IVectorGraph {}
export class VectorGraph {
constructor(properties?: IVectorGraph);
public static encode(message: IVectorGraph, writer?: $protobuf.Writer): $protobuf.Writer;
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): VectorGraph;
}
expected:
import * as $protobuf from "protobufjs";
export interface IVectorGraph {}
export class VectorGraph {
constructor(properties?: IVectorGraph);
public static encode(message: IVectorGraph, writer?: $protobuf.Writer): $protobuf.Writer;
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): VectorGraph;
}
export namespace VectorGraph {
enum GraphType { UNDIRECTED, DIRECTED }
enum AttributeTarget { VERTEX, EDGE }
}
Thanks!
protobuf.js version:
6.8.0First, let me say thanks for improving the generated typings between 6.7.3 and 6.8.0! The only issue I see now is the generated typings don't include enum definitions.
I'm generating static ES6 module from the proto file with
pbjs, then generating typings withpbtsthis way:Here's a repro:
generated:
expected:
Thanks!