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

jsdoc: lib/api/readable.js, fix some types #3567

Merged
merged 5 commits into from
Sep 8, 2024
Merged

jsdoc: lib/api/readable.js, fix some types #3567

merged 5 commits into from
Sep 8, 2024

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Sep 8, 2024

Adds jsdoch to readable, fixes some aspects which i will comment

Comment on lines +283 to 299
if (signal) {
const onAbort = () => {
this.destroy(signal.reason ?? new AbortError())
}
signal.addEventListener('abort', onAbort)
this
.on('close', function () {
signal.removeEventListener('abort', onAbort)
if (signal.aborted) {
reject(signal.reason ?? new AbortError())
} else {
resolve(null)
}
})
} else {
this.on('close', resolve)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reorderering so that we only do signal specific stuff like creating onAbort if needed

lib/api/readable.js Outdated Show resolved Hide resolved
lib/api/readable.js Outdated Show resolved Hide resolved
@Uzlopak
Copy link
Contributor Author

Uzlopak commented Sep 8, 2024

@ronag
PTAL

@Uzlopak Uzlopak merged commit 8ce5ff3 into main Sep 8, 2024
38 checks passed
@Uzlopak Uzlopak deleted the jsdoc-readable branch September 8, 2024 14:06
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
This was referenced Dec 16, 2024
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