[major] Use `emits` instead of a custom emits function