Commit 322e851
committed
fix: separate error emit from regular events
Separates the error event arguments from the regular event arguments.
Before, we had a merged tuple of `[Path | Error, Stats?]` to account for
the fact that some events can be `[Path, Stats?]` and some can be
`[Error, Stats?]`.
However, this results in incorrect types since nothing will ever pass
`Path | Error` as a type (only one or the other).
This separates them and uses a union instead, such that event handlers
other than `error` only ever have a `Path`.1 parent 3fa04b5 commit 322e851
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
305 | | - | |
306 | | - | |
307 | | - | |
| 306 | + | |
308 | 307 | | |
309 | 308 | | |
310 | 309 | | |
| |||
604 | 603 | | |
605 | 604 | | |
606 | 605 | | |
607 | | - | |
| 606 | + | |
608 | 607 | | |
609 | 608 | | |
610 | 609 | | |
| |||
639 | 638 | | |
640 | 639 | | |
641 | 640 | | |
642 | | - | |
| 641 | + | |
643 | 642 | | |
644 | 643 | | |
645 | 644 | | |
| |||
0 commit comments