Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`.
- Loading branch information