diff --git a/package.json b/package.json index ab9f7cc..7da8806 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@types/chai": "4.2.10", "@types/chai-spies": "1.0.1", - "@types/mocha": "7.0.1", + "@types/mocha": "7.0.2", "@types/node": "13.7.7", "browserify": "16.5.0", "chai": "4.2.0", diff --git a/src/event.ts b/src/event.ts index acde6e5..9d30fcc 100644 --- a/src/event.ts +++ b/src/event.ts @@ -17,7 +17,7 @@ export enum EmitSchedule { * Data broadcast is fully asynchronous: each subscriber will be receiving the event * within its own processor tick (under Node.js), or timer tick (in browsers). */ - async = 'async', + async = 'async', /** * Wait for the next processor tick (under Node.js), or timer tick (in browsers), @@ -396,8 +396,8 @@ export class SubEvent { * Creates a new subscription as a promise, to resolve with the next received value, * and cancel the subscription. It can only reject when option `timeout` is specified. * - * Note that if you use this method in a loop, it can miss events, as the subscription - * is cancelled after receiving the first event. + * Note that if you use this method consecutively, you can miss events in between, + * because the subscription is auto-cancelled after receiving the first event. * * @param options * Subscription options: