Commit 6d59daa
committed
refactor: use TypeScript overloads for parseTransactionFlags
Address CodeRabbit review feedback: replace union signature with
proper overloads to prevent invalid call shapes.
- Add ParseTransactionFlagsOptions interface
- Overload 1: parseTransactionFlags(tx, options?) for Transaction objects
- Overload 2: parseTransactionFlags(txType, flagsNum, options?) for strings
- Update tests to use new overload-friendly calling convention1 parent 7079ba4 commit 6d59daa
2 files changed
Lines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
145 | 153 | | |
146 | 154 | | |
147 | 155 | | |
| |||
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
176 | 193 | | |
177 | 194 | | |
178 | | - | |
179 | | - | |
| 195 | + | |
| 196 | + | |
180 | 197 | | |
181 | 198 | | |
182 | 199 | | |
| 200 | + | |
183 | 201 | | |
184 | 202 | | |
185 | 203 | | |
186 | | - | |
| 204 | + | |
| 205 | + | |
187 | 206 | | |
188 | 207 | | |
189 | 208 | | |
| 209 | + | |
190 | 210 | | |
191 | 211 | | |
192 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
| 444 | + | |
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| |||
0 commit comments