-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Description
The new property on FormData, getBuffer isn't properly typed in TypeScript.
The latest types are the following:
declare class FormData extends stream.Readable {
append(key: string, value: any, options?: FormData.AppendOptions | string): void;
getHeaders(): FormData.Headers;
submit(params: string | FormData.SubmitOptions, callback?: (error: Error | undefined, response: http.IncomingMessage) => void): http.ClientRequest;
getBoundary(): string;
getLength(callback: (err: Error | undefined, length: number) => void): void;
getLengthSync(): number;
hasKnownLength(): boolean;
}We need it to look like the following:
declare class FormData extends stream.Readable {
append(key: string, value: any, options?: FormData.AppendOptions | string): void;
getHeaders(): FormData.Headers;
getBuffer(): Buffer;
submit(params: string | FormData.SubmitOptions, callback?: (error: Error | undefined, response: http.IncomingMessage) => void): http.ClientRequest;
getBoundary(): string;
getLength(callback: (err: Error | undefined, length: number) => void): void;
getLengthSync(): number;
hasKnownLength(): boolean;
}If there isn't already a pull request open in DefinitelyTyped I can create one.
Metadata
Metadata
Assignees
Labels
No labels