Hello:

I'm a Typescript developer and trying to use protobuf between Typescript 
and Python.

I have to translate several Typescripts interface below to proto3 messages:

```typescript
enum CommandType {
    'Run',
    'Sleep',
    'Read'
}

interface RunCommand {
    commandType: CommandType.Run;
    destination: string;
}

interface SleepCommand {
    commandType: CommandType.Sleep;
    time: number;
}

interface ReadCommand {
    commandType: CommandType.Read;
    book: string
}

type Command = RunCommand | SleepCommand | EatCommand;
```

Tye type `Command` is a message in my .proto like:

```proto3
syntax = "proto3"

enum CommandType {
    RUN = 0;
    SLEEP = 1;
    READ = 2;
}

message Command {
    CommandType commandType = 0;
    ...
}
```

How can I set the rest properties of the message `Command`?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/d2198b18-a8c1-4446-a7b6-7b1c0ca3a0a6n%40googlegroups.com.

Reply via email to