add types

This commit is contained in:
2026-03-15 14:50:56 +01:00
parent 347438928a
commit 4d8f7c2b02
12 changed files with 183 additions and 144 deletions

19
src/lib/types.ts Normal file
View File

@@ -0,0 +1,19 @@
/** A track entry: [timestamp_seconds, artist, title] */
export type Track = [number, string, string];
/** The summary shape used in sidebar listings. */
export interface StreamSummary {
id: string;
stream_date: number;
title: string | null;
tags: string[];
length_seconds: number;
}
/** The full stream shape used on the detail/player page. */
export interface Stream extends StreamSummary {
filename: string;
format: string;
description: string | null;
tracks: Track[];
}