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

docs: File class is not explicitly documented #1799

Closed
KhafraDev opened this issue Dec 7, 2022 · 10 comments · Fixed by #1810
Closed

docs: File class is not explicitly documented #1799

KhafraDev opened this issue Dec 7, 2022 · 10 comments · Fixed by #1810
Labels
Docs Changes related to the documentation good first issue Good for newcomers

Comments

@KhafraDev
Copy link
Member

    Looks like it's not explicitly documented, so I'd be a little hesitant to use it. But maybe that's just a docs fix for undici

Originally posted by @ThisIsMissEm in nodejs/node#45763 (comment)


In general, the documentation around fetch could massively be improved. We don't seem to document Headers, Request, Response, FormData, or File.

@KhafraDev KhafraDev added good first issue Good for newcomers Docs Changes related to the documentation labels Dec 7, 2022
@ronag
Copy link
Member

ronag commented Dec 7, 2022

I think they are sufficiently documented by e.g. MDN? Why duplicate it?

@KhafraDev
Copy link
Member Author

KhafraDev commented Dec 7, 2022

IMO at the very least we should document that they exist in undici and link to MDN. Wdyt?

The main issue in the above comment is that they didn't know File was an undici export because it isn't documented anywhere.

@ThisIsMissEm
Copy link

Yeah, just documenting that they exists as exports from import { ... } from "undici"; or require("undici") would make sense, even if that documentation just points to MDN, that'd be good enough for me.

@VedanthB
Copy link
Contributor

VedanthB commented Dec 7, 2022

Hey, I want to try doing this if it is just a documentation task.

@mcollina
Copy link
Member

mcollina commented Dec 7, 2022

Yes it is! Just linking to MDN would be fine.

@VedanthB
Copy link
Contributor

VedanthB commented Dec 8, 2022

Could you please help me by pointing to where exactly in the documentation I need to add a link to the MDN documentation and also the MDN documentation link? @mcollina @ThisIsMissEm

@VedanthB
Copy link
Contributor

VedanthB commented Dec 8, 2022

So the Fetch.md file would be something like

# Fetch

Undici exposes a fetch() method starts the process of fetching a resource from the network

[File](https://developer.mozilla.org/en-US/docs/Web/API/File)

[FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData)

[Response](https://developer.mozilla.org/en-US/docs/Web/API/Response)

[Request](https://developer.mozilla.org/en-US/docs/Web/API/Request)

[Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers)

And after this, I would need to add the link to the Fetch.d file I just created in the sidebar.md file right? @KhafraDev

@ThisIsMissEm
Copy link

@VedanthB you might want to do a subheading for each, with the text "This API is implemented as per the standard, you can find documentation on the [Mozilla Developer Network].”, given each of them are classes that can be instantiated.

@VedanthB
Copy link
Contributor

VedanthB commented Dec 8, 2022

I have raised a PR, please review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Changes related to the documentation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants