-
-
Notifications
You must be signed in to change notification settings - Fork 935
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
Wait until body file descriptor is open #1054
Conversation
source/create.ts
Outdated
|
||
options.body.once('error', errorHandler); | ||
|
||
// @ts-ignore Each member of the union type '...' has signatures, but none of those signatures are compatible with each other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it just says that result can be either or a stream or a promise and it doesn't know what types to choose
Or it could be done via a promise that waits until |
@@ -1,3 +1,4 @@ | |||
import {ReadStream} from 'fs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, it's nicer to rename generic imports like this as it's not immediately clear further down in the code that it's an fs read stream.
import {ReadStream: FsReadStream} from 'fs';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do :)
Fixes #1046