Skip to content

Commit

Permalink
Update MANUAL.md (#623)
Browse files Browse the repository at this point in the history
Add extra examples around CamelCase enums and and their prefix
  • Loading branch information
slackr authored Nov 4, 2024
1 parent 91917f6 commit be338a8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,19 +590,29 @@ following `.proto`
enum Foo {
FOO_BAR = 0;
FOO_BAZ = 1;
}
enum MooFoo {
MOO_FOO_BAR = 0;
MOO_FOO_BAZ = 1;
}
```
The prefix "FOO_" is dropped in TypeScript (unless `keep_enum_prefix` option is provided to the plugin):
The prefix "FOO_" and "MOO_FOO" are dropped in TypeScript (unless `keep_enum_prefix` option is provided to the plugin):
```typescript
enum Foo {
BAR = 0,
BAZ = 1
}
enum MooFoo {
BAR = 0,
BAZ = 1
}
```
A quick reminder about TypeScript enums:
- It is possible to lookup the name for an enum value:
Expand Down

0 comments on commit be338a8

Please sign in to comment.