Skip to content

[FETCH] Document body parameter type as BodyInit in send()#26265

Open
jeantimex wants to merge 2 commits intoemscripten-core:mainfrom
jeantimex:main
Open

[FETCH] Document body parameter type as BodyInit in send()#26265
jeantimex wants to merge 2 commits intoemscripten-core:mainfrom
jeantimex:main

Conversation

@jeantimex
Copy link

This PR improves the JSDoc type definitions for the send() method in the internal Fetch-based XHR implementation. Currently, the body parameter lacks a specific type.

@sbc100 sbc100 requested a review from brendandahl February 13, 2026 19:12
@sbc100 sbc100 changed the title Define body parameter type as BodyInit in send() [FETCH] Document body parameter type as BodyInit in send() Feb 13, 2026
/**
* Sends the request.
* @param body The body of the request.
* @param {BodyInit|null} body The body of the request.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we use any TS specific types in our JS docs currently. Is this solving an issue for you or could we use a generic JS type to describe it instead?

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