import { SvelteMap } from 'svelte/reactivity'; import type { Note } from './types.js'; type GlobalValue = { note?: Note; value: unknown; }; export declare const globalValues: SvelteMap; /** * Remove a registered "global" value */ export declare function removeFromPanel(name: PropertyKey): void; /** * @experimental * * Register a "global" value to be inspected with `Inspect.Panel`. * It is recommended to call this during component initialization. * * Returns a function that removes the added value when called. * * If called during component initialization, the value will automatically be removed when the component is unmounted. * * If called after component initialization (i.e. on click) the returned remove-function should be called when the component is destroyed. * If not, value will lose reactivity and may cause weird side-effects or throw errors. * * Can also safely be run inside an `$effect` that will re-add the value if removed and it changes. * * @example * ```svelte * * * * * ``` * * @param name Display name of inspected value * @param val Function returning value to be inspected * @param addedBy (Optional) label of where value was added from * @returns Function that removes added value when called. Returns `true` if value was removed, `false` if value didn't exist */ export declare function addToPanel(name: PropertyKey, val: () => unknown, addedBy?: string): () => void; export {};