-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fixes #29] Reworking formData dependency import. (#30)
* Reworking formData dependency import. * Fixing CI issues. * Disabling rule for a line instead of the whole project.
- Loading branch information
Kacper Kula
authored
Dec 3, 2020
1 parent
cc34619
commit a3eb770
Showing
5 changed files
with
1,112 additions
and
717 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copied over from form-data. | ||
import * as http from "http"; | ||
import * as stream from "stream"; | ||
|
||
export interface IFormData extends stream.Readable { | ||
append(key: string, value: any, options?: IAppendOptions | string): void; | ||
getHeaders(userHeaders?: IHeaders): IHeaders; | ||
submit( | ||
params: string | ISubmitOptions, | ||
callback?: (error: Error | null, response: http.IncomingMessage) => void | ||
): http.ClientRequest; | ||
getBuffer(): Buffer; | ||
getBoundary(): string; | ||
getLength(callback: (err: Error | null, length: number) => void): void; | ||
getLengthSync(): number; | ||
hasKnownLength(): boolean; | ||
} | ||
|
||
interface IHeaders { | ||
[key: string]: any; | ||
} | ||
|
||
interface IAppendOptions { | ||
header?: string | IHeaders; | ||
knownLength?: number; | ||
filename?: string; | ||
filepath?: string; | ||
contentType?: string; | ||
} | ||
|
||
interface ISubmitOptions extends http.RequestOptions { | ||
protocol?: "https:" | "http:"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.