示例工程 18-streaming-ui

18-streaming-ui/app/.tsc/src/App.d.ts

typescript · 1.1 KB

import type { StreamMessage } from "../shared/ipc";
type TabId = "compare" | "reorder" | "scroll";
declare global {
    interface Window {
        api: {
            start(options: {
                chunks: number;
                intervalMs: number;
                shuffle: boolean;
                from: number;
            }): Promise<{
                ok: true;
                streamId: string;
                from: number;
                to: number;
            } | {
                ok: false;
                code: string;
            }>;
            cancel(): Promise<{
                ok: boolean;
            }>;
            onStream(cb: (message: StreamMessage) => void): () => void;
        };
        __setTab?: (tab: TabId) => void;
        __snapshot?: () => unknown;
        __smoke?: () => Promise<unknown>;
        __prepareShots?: () => Promise<void>;
        __startReorder?: () => Promise<void>;
        __cancel?: () => Promise<void>;
        __fillScroll?: () => void;
        __pauseScroll?: () => void;
    }
}
export default function App(): import("react").JSX.Element;
export {};
//# sourceMappingURL=App.d.ts.map