Skip to content

Conversation

jsaguet
Copy link
Contributor

@jsaguet jsaguet commented Aug 3, 2025

This relates to...

Rationale

The install function is not available in undici types so when trying to use it in a TS project, we have to add @ts-ignore or similar to be able to use it.

Changes

Adds install function to d.ts

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 3, 2025

Do we really need a separate install.d.ts for a trivial function?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Can you plese integrate this this in types/index.d.ts directly? Could you also add a test for this type? We use tsd.

@jsaguet jsaguet force-pushed the feat/add-install-to-type-definitions branch from dba3883 to b2ef8a0 Compare August 4, 2025 07:39
@jsaguet jsaguet force-pushed the feat/add-install-to-type-definitions branch from b2ef8a0 to de4edaf Compare August 4, 2025 07:46
@jsaguet
Copy link
Contributor Author

jsaguet commented Aug 4, 2025

I implemented the changes.
Since I'm now in the same file, I had to declare the function with a different name to be able to add it to the Undici namespace as install. Let me know if you know another way to achieve this.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm!

@Uzlopak Uzlopak merged commit 43fb162 into nodejs:main Aug 9, 2025
22 of 27 checks passed
@github-actions github-actions bot mentioned this pull request Aug 17, 2025
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.

6 participants