UNPKG

637 BTypeScriptView Raw
1/// <reference types="node" />
2import { File } from './types';
3interface FileBlobOptions {
4 mode?: number;
5 contentType?: string;
6 data: string | Buffer;
7}
8interface FromStreamOptions {
9 mode?: number;
10 contentType?: string;
11 stream: NodeJS.ReadableStream;
12}
13export default class FileBlob implements File {
14 type: 'FileBlob';
15 mode: number;
16 data: string | Buffer;
17 contentType: string | undefined;
18 constructor({ mode, contentType, data }: FileBlobOptions);
19 static fromStream({ mode, contentType, stream, }: FromStreamOptions): Promise<FileBlob>;
20 toStream(): NodeJS.ReadableStream;
21}
22export {};