Closed demurgos closed 7 years ago
instanceof
is much too flaky to use in this library so there wouldn't be a consistent way to force a "full-fledged Stat object". I am fine with accepting Stats-like objects until we are able to address #105 in the future. Does that answer the question?
Thank you, we'll make sure this is typed as such.
Hi, I am working on formalizing the documentation of Vinyl so both the Typescript compiler and editors can better understand your API. There is currently an ongoing effort to add
typings
for the version2.0.0
.We have two sources for this: the code and the official documentation.
Currently, we have an issue with the documented type of
options.stat
and the actual usage of it.Here is the relevant comment by @felixfbecker:
Could you clarify if the argument really has to be an
instanceof fs.Stats
or if an object with a subset of methods and attributes from is enough ? In the latter case, it would mean that user can create their own Stats-like objects and pass them as options (just as in your tests).