Spaces:
Runtime error
Runtime error
File size: 554 Bytes
246efdb cd353d4 246efdb fe66ec6 246efdb fe66ec6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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);
|