From ed9ea0e373fca23eb93e52b78fc2c5da1be15fe0 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 23 Jun 2025 15:28:03 +0200 Subject: [PATCH] TS fixes --- web/eslint.config.js | 2 +- web/src/client/sw.ts | 6 +++--- web/src/server/pty/pty-manager.ts | 2 ++ web/tsconfig.test.json | 11 +++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 web/tsconfig.test.json diff --git a/web/eslint.config.js b/web/eslint.config.js index cf2d240d..702538d5 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -14,7 +14,7 @@ module.exports = tseslint.config( files: ['src/**/*.ts', 'src/**/*.tsx'], languageOptions: { parserOptions: { - project: ['./tsconfig.json', './tsconfig.client.json'], + project: ['./tsconfig.json', './tsconfig.client.json', './tsconfig.sw.json', './tsconfig.test.json'], tsconfigRootDir: __dirname, }, }, diff --git a/web/src/client/sw.ts b/web/src/client/sw.ts index 4716f27d..e67d620d 100644 --- a/web/src/client/sw.ts +++ b/web/src/client/sw.ts @@ -168,7 +168,7 @@ async function handlePushNotification(payload: PushNotificationPayload): Promise tag: tag || `${NOTIFICATION_TAG_PREFIX}${data.type}-${Date.now()}`, requireInteraction: requireInteraction || data.type === 'session-error', silent: false, - // @ts-ignore - renotify is a valid option but not in TypeScript types + // @ts-expect-error - renotify is a valid option but not in TypeScript types renotify: true, actions: actions || getDefaultActions(data), timestamp: data.timestamp, @@ -176,7 +176,7 @@ async function handlePushNotification(payload: PushNotificationPayload): Promise // Add vibration pattern for mobile devices if ('vibrate' in navigator) { - // @ts-ignore - vibrate is a valid option but not in TypeScript types + // @ts-expect-error - vibrate is a valid option but not in TypeScript types notificationOptions.vibrate = getVibrationPattern(data.type); } @@ -402,7 +402,7 @@ async function queueNotification(payload: PushNotificationPayload): Promise