Open redexp opened 5 years ago
What do you think about adding new target like ts-module to generate from proto like this
ts-module
syntax = "proto3"; message User { int32 id = 1; string name = 2; }
to ts like this
import {Message, Type, Field} from "protobufjs/light"; export interface UserInterface { id: number; name: string; } @Type.d("User") export default class User extends Message<User> implements UserInterface { @Field.d(1, "int32") public id: number; @Field.d(2, "string") public name: string; public static verify(message: UserInterface) { return super.verify(message); } public static encode(message: UserInterface) { return super.encode(message); } }
This might help https://github.com/improbable-eng/ts-protoc-gen
What do you think about adding new target like
ts-module
to generate from proto like thisto ts like this