mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-10 12:05:53 +00:00
TS fixes
This commit is contained in:
parent
0a349e72dd
commit
ed9ea0e373
4 changed files with 17 additions and 4 deletions
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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<void
|
|||
|
||||
// Register for background sync
|
||||
try {
|
||||
// @ts-ignore - sync is part of Background Sync API
|
||||
// @ts-expect-error - sync is part of Background Sync API
|
||||
await self.registration.sync.register('notification-sync');
|
||||
} catch (error) {
|
||||
console.warn('[SW] Background sync not supported:', error);
|
||||
|
|
|
|||
|
|
@ -323,9 +323,11 @@ export class PtyManager extends EventEmitter {
|
|||
logger.debug(`Bell data in session ${session.id}: ${JSON.stringify(data)}`);
|
||||
|
||||
// Count total bells and OSC-terminated bells
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const totalBells = (data.match(/\x07/g) || []).length;
|
||||
|
||||
// Count OSC sequences terminated with bell: \x1b]...\x07
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const oscMatches = data.match(/\x1b]([^\x07\x1b]|\x1b[^]])*\x07/g) || [];
|
||||
const oscTerminatedBells = oscMatches.length;
|
||||
|
||||
|
|
|
|||
11
web/tsconfig.test.json
Normal file
11
web/tsconfig.test.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.ts",
|
||||
"src/test/**/*"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue