Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow async listeners in the TypeScript types #70

Merged
merged 2 commits into from
Dec 29, 2020

Commits on Dec 28, 2020

  1. Update TypeScript types to allow listeners that return Promises

    Emittery already supports awaiting event emission, which in turn awaits all the listeners that return a Promise. If a caller awaits `emit`, all the listeners will have resolved by the time the outer promise resolves, which is great!
    
    This adds a test for that behaviour, and updates the TypeScript types to support these async listeners. There's no new or changed behaviour.
    airhorns committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    2d4a6a8 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2020

  1. Update index.d.ts

    Co-authored-by: Sindre Sorhus <[email protected]>
    airhorns and sindresorhus authored Dec 29, 2020
    Configuration menu
    Copy the full SHA
    6d481a9 View commit details
    Browse the repository at this point in the history