mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-01 11:14:32 +00:00
The request library allows anything to be put in a Multipart body as long as it can be passed to `Buffer.from()`: https://github.com/request/request/blob/master/lib/multipart.js#L74 However the current implementation allows only `string` to be used as the multipart body. In my use-case I needed to pass a `Buffer` instance directly. This change defines a type alias for `MultipartBody` that includes `string`, `Buffer`, `ArrayBuffer` or `UInt8Array`.