refactor: consolidate IPC types into src/shared/types.ts

The 12 cross-process data types were manually copied across
src/preload/index.ts and src/renderer/src/types/t4sd.d.ts. A silent
field addition or rename in either file would not produce a compile
error in the other — the divergence only surfaces at runtime.

A shared module makes the compiler enforce consistency. Preload imports
from shared/types and re-exports for downstream consumers. The renderer's
t4sd.d.ts re-exports the same types from shared/types, so all existing
screen imports continue to work without modification.

Both tsconfigs are extended to include src/shared so the module is
reachable from both composite projects.
This commit is contained in:
Andre
2026-05-15 08:49:31 +02:00
parent 211174f889
commit 13b28fdc91
6 changed files with 153 additions and 181 deletions
+1 -7
View File
@@ -8,10 +8,4 @@ export type Quality =
| 'audio_only'
| 'worst'
export interface PlaybackEvent {
kind: 'started' | 'stopped' | 'error'
channelLogin?: string
message?: string
durationSeconds?: number
isLive?: boolean
}
export type { PlaybackEvent } from '../../shared/types'