Closed pierznj closed 2 years ago
You're right, it should return a writable stream CC https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56925 , @gboer
are you using 2.x or 1.x @pierznj ? I'll have a look to see if I can fix this tomorrow.
2.x @gboer. Thank you!
PR is up! Might take some time before it's reviewed, merged, and released. So a bit of patience please :)
Version 2.0.1 of @types/formidable is available @pierznj. Good luck!
Hi
I noticed that the type is the following:
fileWriteStreamHandler?: (() => Writable) | undefined;
But isn't there the formidable.File
passed in?
@crivera , seems to be indeed incorrect. It was reported before in #821 apparently. I'll have a look to see if I can fix it next week.
Awesome thank you!
PR is up here: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/65215 @crivera . Just needs an approval of a DT maintainer and then it can be released. Might take a day or 2 before it is released/usable.
it's released as version 2.0.6 @crivera :)
Here's the TS definition for the
fileWriteStreamHandler
option. Note that the return type is void but the comments (and code examples concur) say to return a writeable stream. Am I missing something? Currently I can't use it, unless I cast the type of the function but before I do that I want to know if I'm misunderstanding.