doc: distinguish between fs.Stats and fs.BigIntStats#60791
doc: distinguish between fs.Stats and fs.BigIntStats#60791LiviaMedeiros wants to merge 2 commits intonodejs:mainfrom
fs.Stats and fs.BigIntStats#60791Conversation
|
My read was always that this was an intentional "legal fiction", similar to how classes like KeyObject are documented to be a single entity but are actually implemented as a class tree. The BigIntStats constructor isn't part of the public API surface, even though it's observable. |
|
Yes, it can be viewed that way. IMHO unlike |
|
Honestly, my gut feeling is that these would be better off as a single class anyway... the only areas of divergence are the setting of the properties in the constructor and the single bigint-to-number conversion in |
fs.Statsandfs.BigIntStatsare similar, but separate classes. Currently, thefsdocumentation gives wrong impression, as ifBigIntStatsis an alias or subclass ofStats.Making the difference more clear and explicit might help improve the accuracy of type definitions.