-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Please document fs.WriteStream.path #4327
Comments
I don't know, it has a bunch of undocumented properties; the reason they're not underscore-prefixed is mostly an accident of history. |
Among these, only
At this point it would be a serious breaking change to prefix them all with underscores, of course, but exposing them would require some more clarification IMHO. From what I'm seeing, the first implementation of these was by @felixge |
The reason I use the |
Well, it -has- been there since Mar 2010 at least. |
@rogierschouten Seems like that module could just return the name it used? |
To provide some historical context. I implemented WriteStream over 5 years ago. At this time node core didn't have much coding conventions and objects often exposed "private" properties without any indication (see 1, 2). IIRC Ryan disliked the '_' prefix convention back then, possibly out of resentment for Python. As far as the path property is concerned, I don't recall if I intended it to be private or not, but at this point I'd just document it as an official property. Having a mechanism for getting the path seems very useful, and I can only imagine how much code in the wild already depends on the existence of the |
Documents the "path" property on fs.WriteStream and fs.ReadStream. See nodejs#4327
I've written code that depends on this for sure. |
Documents the "path" property on fs.WriteStream and fs.ReadStream. See #4327 PR-URL: #4368 Reviewed-By: James M Snell <[email protected]>
Landed |
Documents the "path" property on fs.WriteStream and fs.ReadStream. See #4327 PR-URL: #4368 Reviewed-By: James M Snell <[email protected]>
Documents the "path" property on fs.WriteStream and fs.ReadStream. See #4327 PR-URL: #4368 Reviewed-By: James M Snell <[email protected]>
Documents the "path" property on fs.WriteStream and fs.ReadStream. See #4327 PR-URL: #4368 Reviewed-By: James M Snell <[email protected]>
Documents the "path" property on fs.WriteStream and fs.ReadStream. See nodejs#4327 PR-URL: nodejs#4368 Reviewed-By: James M Snell <[email protected]>
Documents the "path" property on fs.WriteStream and fs.ReadStream. See nodejs#4327 PR-URL: nodejs#4368 Reviewed-By: James M Snell <[email protected]>
Documents the "path" property on fs.WriteStream and fs.ReadStream. See nodejs#4327 PR-URL: nodejs#4368 Reviewed-By: James M Snell <[email protected]>
WriteStreams have a .path property with the path of the file they write to. Please document this property so that I can reliably use it without fear of it being an unsupported feature. This will also enable me to put it into node.d.ts and push that to DefinitelyTyped.
The text was updated successfully, but these errors were encountered: