Installation
npm install --save @types/wicg-entries-api
Summary
This package contains type definitions for wicg-entries-api (https://github.com/WICG/entries-api).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/wicg-entries-api.
index.d.ts
type ErrorCallback = (err: DOMException) => void;
type FileSystemEntryCallback = (entry: FileSystemEntry) => void;
type FileSystemEntriesCallback = (entries: FileSystemEntry[]) => void;
type FileCallback = (file: File) => void;
interface FileSystemFlags {
create?: boolean | undefined;
exclusive?: boolean | undefined;
}
declare global {
interface FileSystemEntry {
readonly isFile: boolean;
readonly isDirectory: boolean;
readonly name: string;
readonly fullPath: string;
readonly filesystem: FileSystem;
getParent(successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void;
}
interface FileSystemDirectoryEntry extends FileSystemEntry {
createReader(): FileSystemDirectoryReader;
getFile(
path?: string,
options?: FileSystemFlags,
successCallback?: FileSystemEntryCallback,
errorCallback?: ErrorCallback,
): void;
getDirectory(
path?: string,
options?: FileSystemFlags,
successCallback?: FileSystemEntryCallback,
errorCallback?: ErrorCallback,
): void;
}
interface FileSystemDirectoryReader {
readEntries(successCallback: FileSystemEntriesCallback, errorCallback?: ErrorCallback): void;
}
interface FileSystemFileEntry extends FileSystemEntry {
file(successCallback: FileCallback, errorCallback?: ErrorCallback): void;
}
interface FileSystem {
readonly name: string;
readonly root: FileSystemDirectoryEntry;
}
interface File {
readonly webkitRelativePath: string;
}
interface HTMLInputElement {
webkitdirectory: boolean;
readonly webkitEntries: readonly FileSystemEntry[];
}
interface DataTransferItem {
webkitGetAsEntry(): FileSystemEntry | null;
}
}
export {};
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: none
Credits
These definitions were written by Henning Kasch, and Ingvar Stepanyan.