Skip to content

Commit be338a8

Browse files
authored
Update MANUAL.md (#623)
Add extra examples around CamelCase enums and and their prefix
1 parent 91917f6 commit be338a8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

MANUAL.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,19 +590,29 @@ following `.proto`
590590
enum Foo {
591591
FOO_BAR = 0;
592592
FOO_BAZ = 1;
593+
}
594+
enum MooFoo {
595+
MOO_FOO_BAR = 0;
596+
MOO_FOO_BAZ = 1;
593597
}
594598
```
595599
596-
The prefix "FOO_" is dropped in TypeScript (unless `keep_enum_prefix` option is provided to the plugin):
600+
The prefix "FOO_" and "MOO_FOO" are dropped in TypeScript (unless `keep_enum_prefix` option is provided to the plugin):
597601
598602
```typescript
599603
enum Foo {
600604
BAR = 0,
601605
BAZ = 1
606+
}
607+
enum MooFoo {
608+
BAR = 0,
609+
BAZ = 1
602610
}
603611
```
604612
605613
614+
615+
606616
A quick reminder about TypeScript enums:
607617
608618
- It is possible to lookup the name for an enum value:

0 commit comments

Comments
 (0)