doc: add annotation to writeFile data as Object#39167
doc: add annotation to writeFile data as Object#39167JakobJingleheimer wants to merge 1 commit intonodejs:masterfrom
data as Object#39167Conversation
|
Consolidating the various
Oh 😅
@mscdex @aduh95 I included the footnote marker instead of duplicating the wording everywhere so it could be consolidated (since it probably has a single implementation source under the hood—meaning they would all change together). Putting myself in the user's shoes, I figure if I saw Regarding the In terms of which marker to use, my preference would be superscript numbers because it's robust (supporting an unlimited number of them, whereas symbols like |
IMO I don't think that's a problem. There is a lot of duplicated wording in various sections of the node docs. In general I think it's no different than clarifying anything else about the signature or behavior of various APIs. The end user will need to be reading the function description anyway. If we're going to be changing how we convey certain types of information in the node API documentation, we should probably do so on a wider scale with a solid plan. For now though I think it's enough to just add the missing wording where necessary, even if it's duplicated. |
That is not true for the example I gave above. But yes, I agree: if there is no precedent for footnotes, best not to start randomly now. I'll update to duplicating the wording and leave the DRYing for later. |
010ea71 to
941010d
Compare
doc/api/fs.md
Outdated
| * `encoding` {string} | ||
| * Returns: {number} The number of bytes written. | ||
|
|
||
| If `string` is a plain object, like all variations of `writeFile`, it must have |
There was a problem hiding this comment.
I'm not sure if this is applicable, but Object is listed in the types, so I guessed yes. Wanted to specifically call out just in case.
ccbdccf to
493a748
Compare
|
@aduh95 🙏 I don't have access to merge PRs yet (not until after my first PR lands, if I recall correctly). Could you assist? |
|
Landed in 9257372...6a4b4ce |
Fixes: #39152 PR-URL: #39167 Reviewed-By: Antoine du Hamel <[email protected]>
Fixes: #39152 PR-URL: #39167 Reviewed-By: Antoine du Hamel <[email protected]>
Fixes: #39152 PR-URL: #39167 Reviewed-By: Antoine du Hamel <[email protected]>
Fixes: #39152