import type { Result } from "@cprussin/option-result"; import type { DomicileCastSink, DomicileHost } from "../domicile-host"; import type { On } from "./subscribe"; export type GoogleCastListeners = { /** {@link GoogleCast.receivers} changed. */ change: () => void; }; export type GoogleCast = { /** The TVs near, each with the route of its cast while one runs. */ readonly receivers: readonly DomicileCastSink[]; /** Cast the desktop to TV `id`: its route, or why the TV refused. */ cast: (id: string) => Promise>; /** Stop cast `route`; its TV's `route` is null in the next `change`. */ stop: (route: string) => void; on: On; }; export type GoogleCastHost = Pick; export declare const googleCast: (host: GoogleCastHost) => GoogleCast;