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

chore: ensure Writer methods return Promise<void> #10

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

EvanHahn
Copy link
Contributor

@EvanHahn EvanHahn commented Sep 4, 2024

Vairous Writer methods were returning Promise<any> because of what Writer.prototype.#append returned. I think Promise<void> was the intent, so I (1) added explicit returns to relevant functions (2) made sure functions actually returned those values.

I also switched the order of the event listener in #append, just in case the entry event is emitted synchronously.

Vairous `Writer` methods were returning `Promise<any>` because of what
`Writer.prototype.#append` returned. I think `Promise<void>` was the
intent, so I (1) added explicit returns to relevant functions (2) made
sure functions actually returned those values.

I also switched the order of the event listener in `#append`, just in
case the `entry` event is emitted synchronously.
@EvanHahn EvanHahn requested a review from gmaclennan September 4, 2024 22:12
@gmaclennan gmaclennan merged commit 04ee9b1 into main Sep 5, 2024
@gmaclennan gmaclennan deleted the writer-append-should-return-promise-void branch September 5, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants