UNPKG

@zhengxs/http

Version:

A lightweight cross-platform http request library

32 lines (31 loc) 1.67 kB
export interface FilePropertyBag extends BlobPropertyBag { /** * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date. */ lastModified?: number; } /** * The **File** interface provides information about files and allows JavaScript to access their content. */ export declare class File extends globalThis.Blob { #private; static [Symbol.hasInstance](value: unknown): value is File; /** * Creates a new File instance. * * @param fileBits - An `Array` strings, or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView), [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects, or a mix of any of such objects, that will be put inside the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). * @param name - The name of the file. * @param options - An options object containing optional attributes for the file. */ constructor(fileBits: BlobPart[], name: string, options?: FilePropertyBag); /** * Name of the file referenced by the File object. */ get name(): string; get webkitRelativePath(): string; /** * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date. */ get lastModified(): number; get [Symbol.toStringTag](): string; }