Skip to content

Commit 621e3d1

Browse files
committed
Add @types/wicg-file-system-access
1 parent 95a542d commit 621e3d1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

web/bun.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@tailwindcss/vite": "^4.1.7",
2828
"@types/chroma-js": "^3.1.1",
2929
"@types/luxon": "^3.6.2",
30+
"@types/wicg-file-system-access": "^2023.10.6",
3031
"eslint": "^9.27.0",
3132
"eslint-config-prettier": "^10.1.5",
3233
"eslint-plugin-svelte": "^3.9.0",
@@ -287,6 +288,8 @@
287288

288289
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
289290

291+
"@types/wicg-file-system-access": ["@types/wicg-file-system-access@2023.10.6", "", {}, "sha512-YO/183gNRzZFSdKu+ikkD7ambAj4PhgjFAF2A/Mw/7wroSF6ne8r804RkpZzqrJ/F6DO2/IYlQF/ULOZ/bhKyA=="],
292+
290293
"@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.33.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.33.0", "@typescript-eslint/type-utils": "8.33.0", "@typescript-eslint/utils": "8.33.0", "@typescript-eslint/visitor-keys": "8.33.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.33.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, "sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ=="],
291294

292295
"@typescript-eslint/parser": ["@typescript-eslint/parser@8.33.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.33.0", "@typescript-eslint/types": "8.33.0", "@typescript-eslint/typescript-estree": "8.33.0", "@typescript-eslint/visitor-keys": "8.33.0", "debug": "^4.3.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, "sha512-JaehZvf6m0yqYp34+RVnihBAChkqeH+tqqhS0GuX1qgPpwLvmTPheKEs6OeCK6hVJgXZHJ2vbjnC9j119auStQ=="],

web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@tailwindcss/vite": "^4.1.7",
2929
"@types/chroma-js": "^3.1.1",
3030
"@types/luxon": "^3.6.2",
31+
"@types/wicg-file-system-access": "^2023.10.6",
3132
"eslint": "^9.27.0",
3233
"eslint-config-prettier": "^10.1.5",
3334
"eslint-plugin-svelte": "^3.9.0",

web/src/lib/components/files/index.svelte.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@ export class FileEntry implements FileSystemEntry {
2323
}
2424

2525
export async function pickDirectory(): Promise<DirectoryEntry> {
26-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
27-
if (!(window as any).showDirectoryPicker) {
26+
if (!window.showDirectoryPicker) {
2827
return await pickDirectoryLegacy();
2928
}
3029

31-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
32-
const directoryHandle: FileSystemDirectoryHandle = await (window as any).showDirectoryPicker();
30+
const directoryHandle: FileSystemDirectoryHandle = await window.showDirectoryPicker();
3331

34-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
35-
if (!(directoryHandle as any).entries) {
32+
if (!directoryHandle.entries) {
3633
return await pickDirectoryLegacy();
3734
}
3835

@@ -48,8 +45,7 @@ async function handleToDirectoryEntry(directoryHandle: FileSystemDirectoryHandle
4845
while (stack.length > 0) {
4946
const [dirHandle, dirEntry] = stack.shift()!;
5047

51-
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unused-vars
52-
for await (const [name, handle] of (dirHandle as any).entries()) {
48+
for await (const [, handle] of dirHandle.entries()) {
5349
if (handle.kind === "directory") {
5450
const subDir = new DirectoryEntry(handle.name, []);
5551
dirEntry.children.push(subDir);

0 commit comments

Comments
 (0)