Deal with build failures related to FileSystemHandle changes with TS@next (fix #141908)

This commit is contained in:
Benjamin Pasero
2022-02-09 07:59:45 +01:00
parent 2ec520c893
commit 50b42f9087
8 changed files with 54 additions and 42 deletions

View File

@@ -1491,6 +1491,14 @@ export namespace WebFileSystemAccess {
return false;
}
export function isFileSystemFileHandle(handle: FileSystemHandle): handle is FileSystemFileHandle {
return handle.kind === 'file';
}
export function isFileSystemDirectoryHandle(handle: FileSystemHandle): handle is FileSystemDirectoryHandle {
return handle.kind === 'directory';
}
}
type ModifierKey = 'alt' | 'ctrl' | 'shift' | 'meta';