diff options
| author | darkuss <darkussdelta@gmail.com> | 2026-08-22 01:58:37 +0200 |
|---|---|---|
| committer | darkuss <darkussdelta@gmail.com> | 2026-08-22 01:58:37 +0200 |
| commit | 8f32fd58cafe677c07d9ed9fff84f6e255156d37 (patch) | |
| tree | a5de06ffb2c0a8b878c8a563ec8cee692efc98ac /src/apps/source.ts | |
| parent | 5ac62cc1a4d9a5f50ea26d5bc1afb0fbf95da23c (diff) | |
holy shit i'm finally done
Diffstat (limited to 'src/apps/source.ts')
| -rw-r--r-- | src/apps/source.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/apps/source.ts b/src/apps/source.ts new file mode 100644 index 0000000..66e8f06 --- /dev/null +++ b/src/apps/source.ts @@ -0,0 +1,33 @@ +import { JSX } from "preact/jsx-runtime" + +export interface Source { + type: string, +} + +export interface Listen extends Source { + type: "listen" +} + +export interface Address extends Source { + type: "video" | "image" | "link", + link: URL, + pixelated?: boolean +} + +export interface VirtualFile extends Source { + name: string, + height?: string | number, + width?: string | number +} + +export interface VirtualTextFile extends VirtualFile { + type: "text", + content: JSX.Element +} + +export type Sources = Address | VirtualTextFile | Listen +export type SourceTypes = Sources["type"] +export type GetSource = { + [SourceType in Sources as SourceType["type"]]: SourceType +} + |
