radames's picture
bump sveltkit and svelte
246efdb
raw
history blame
554 Bytes
import {
derived,
get,
writable,
type Readable,
type Writable,
} from "svelte/store";
export type PipelineValues = Record<string, string | boolean | number>;
export const pipelineValues: Writable<PipelineValues> = writable({});
export const deboucedPipelineValues: Readable<PipelineValues> = derived(
pipelineValues,
($pipelineValues, set) => {
const debounced = setTimeout(() => {
set($pipelineValues);
}, 100);
return () => clearTimeout(debounced);
},
);
export const getPipelineValues = () => get(pipelineValues);