Skip to content

Comments

fix: minor changes in dispatcher-base.js and types for Dispatcher#4556

Merged
Uzlopak merged 2 commits intomainfrom
minor-opts-dispatcher-base
Sep 21, 2025
Merged

fix: minor changes in dispatcher-base.js and types for Dispatcher#4556
Uzlopak merged 2 commits intomainfrom
minor-opts-dispatcher-base

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Sep 20, 2025

close and destroy is now more similar. also the ClientDestroyedError is instantiated in the close function and not in the queueMicrotask to ensure that you have some meaningful stack.

regarding typings:

actually functions need to be sorted by descending arity.
https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#ordering

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@Uzlopak Uzlopak requested a review from Copilot September 20, 2025 21:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes minor improvements to the dispatcher-base.js file and updates TypeScript type definitions to ensure better error handling and type compliance. The changes focus on making the close and destroy methods more consistent while improving error stack trace quality.

  • Standardized null coalescing assignment operators for cleaner code consistency
  • Improved error instantiation timing to provide meaningful stack traces
  • Updated JSDoc type annotations for better type checking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Uzlopak Uzlopak merged commit 6365a90 into main Sep 21, 2025
29 checks passed
@Uzlopak Uzlopak deleted the minor-opts-dispatcher-base branch September 21, 2025 09:27
@github-actions github-actions bot mentioned this pull request Jan 5, 2026
slagiewka pushed a commit to slagiewka/undici that referenced this pull request Feb 14, 2026
…dejs#4556)

* fix: minor changes in dispatcher-base.js and types for Dispatcher

* specify array type
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