mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-12 10:34:32 +08:00
2b6cbf2590
* rename * save patch * fix everything * format * rm file * fix stuff * tweaks * tweaks * tweaks * tweaks * tweaks * asd * asd * asd * asd * asd * asd * asd * fix * Fix scripts/run_lite.sh and scripts/build_lite.sh (#9170) * fixes * fixes * asd * asd * asd * review comments * fiux types * fiux types * make fileexpolorer public * format * lint * lint --------- Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
13 lines
410 B
TypeScript
13 lines
410 B
TypeScript
import { setContext, getContext } from "svelte";
|
|
import type { WorkerProxy } from "../src/worker-proxy";
|
|
|
|
const WORKER_PROXY_CONTEXT_KEY = "WORKER_PROXY_CONTEXT_KEY";
|
|
|
|
export function setWorkerProxyContext(workerProxy: WorkerProxy): void {
|
|
setContext(WORKER_PROXY_CONTEXT_KEY, workerProxy);
|
|
}
|
|
|
|
export function getWorkerProxyContext(): WorkerProxy | undefined {
|
|
return getContext(WORKER_PROXY_CONTEXT_KEY);
|
|
}
|