fix hygiene issue with web file system access

This commit is contained in:
Benjamin Pasero
2022-02-09 08:18:28 +01:00
parent 204d024703
commit 7759309bd8
8 changed files with 38 additions and 30 deletions

View File

@@ -1477,30 +1477,6 @@ export function multibyteAwareBtoa(str: string): string {
return btoa(toBinary(str));
}
/**
* Typings for the https://wicg.github.io/file-system-access
*
* Use `supported(window)` to find out if the browser supports this kind of API.
*/
export namespace WebFileSystemAccess {
export function supported(obj: any & Window): boolean {
if (typeof obj?.showDirectoryPicker === 'function') {
return true;
}
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';
export interface IModifierKeyStatus {