Add discriminants to FileSystemHandle subtypes (#1251)
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
This commit is contained in:
Родитель
464221ebe6
Коммит
23b54aa88c
|
@ -5123,6 +5123,7 @@ declare var FileSystemDirectoryEntry: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
||||
readonly kind: "directory";
|
||||
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
||||
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
||||
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
||||
|
@ -5168,6 +5169,7 @@ declare var FileSystemFileEntry: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemFileHandle extends FileSystemHandle {
|
||||
readonly kind: "file";
|
||||
getFile(): Promise<File>;
|
||||
}
|
||||
|
||||
|
|
|
@ -1482,6 +1482,7 @@ declare var FileReader: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
||||
readonly kind: "directory";
|
||||
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
||||
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
||||
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
||||
|
@ -1495,6 +1496,7 @@ declare var FileSystemDirectoryHandle: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemFileHandle extends FileSystemHandle {
|
||||
readonly kind: "file";
|
||||
getFile(): Promise<File>;
|
||||
}
|
||||
|
||||
|
|
|
@ -1402,6 +1402,7 @@ declare var FileReaderSync: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
||||
readonly kind: "directory";
|
||||
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
||||
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
||||
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
||||
|
@ -1415,6 +1416,7 @@ declare var FileSystemDirectoryHandle: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemFileHandle extends FileSystemHandle {
|
||||
readonly kind: "file";
|
||||
getFile(): Promise<File>;
|
||||
}
|
||||
|
||||
|
|
|
@ -1534,6 +1534,7 @@ declare var FileReaderSync: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
||||
readonly kind: "directory";
|
||||
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
||||
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
||||
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
||||
|
@ -1547,6 +1548,7 @@ declare var FileSystemDirectoryHandle: {
|
|||
|
||||
/** Available only in secure contexts. */
|
||||
interface FileSystemFileHandle extends FileSystemHandle {
|
||||
readonly kind: "file";
|
||||
getFile(): Promise<File>;
|
||||
}
|
||||
|
||||
|
|
|
@ -1060,6 +1060,30 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"FileSystemFileHandle": {
|
||||
"name": "FileSystemFileHandle",
|
||||
"properties": {
|
||||
"property": {
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"readonly": true,
|
||||
"overrideType": "\"file\""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"FileSystemDirectoryHandle": {
|
||||
"name": "FileSystemDirectoryHandle",
|
||||
"properties": {
|
||||
"property": {
|
||||
"kind": {
|
||||
"name": "kind",
|
||||
"readonly": true,
|
||||
"overrideType": "\"directory\""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче