function createFileFromStream(stream, name, options = {}) {
    var _a, _b, _c, _d;
    return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => {
            const s = stream();
            if (isNodeReadableStream(s)) {
                throw new Error("Not supported: a Node stream was provided as input to createFileFromStream.");
            }
            return s;
        }, [rawContent]: stream });
}
Create an object that implements the File interface. This object is intended to be
passed into RequestBodyType.formData, and is not guaranteed to work as expected in
other situations.

Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable.

@param content - the content of the file as a Uint8Array in memory.
@param name - the name of the file.
@param options - optional metadata about the file, e.g. file name, file size, MIME type.