Commit 77a0c1c
committed
chore: update conventions to explicitly ban TypeScript enum
Convention #3 already said to use `as const` arrays, but didn't
explicitly call out TypeScript `enum` as bad. Enums cause type cast
issues when crossing WASM/serde boundaries. Added enum to the "Bad"
examples and added WASM/serde reasoning to "Why".
BTC-32261 parent 7d48d0a commit 77a0c1c
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
128 | 138 | | |
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
132 | | - | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| |||
0 commit comments