terminal_presets.svelte.ts view source
import {TerminalPresets} from '@fuzdev/zzz/terminal_presets.svelte.js'; App-level collection of saved terminal commands. Seeded once with
TERMINAL_PRESETS_DEFAULT unless constructed with items.
TODO persist user-created presets — they last only as long as the page
inheritance
extends: Cell<typeof TerminalPresetsJson>
constructor
type new (options: TerminalPresetsOptions): TerminalPresets
add
type (json?: { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; command?: string | undefined; args?: string[] | undefined; cwd?: string | undefined; } | undefined): TerminalPreset
remove
Removes and disposes a preset.
type (id: string & $brand<"Uuid">): boolean
returns boolean
whether the preset was found
clear
Removes and disposes every preset.
type (): void
returns void
dispose
type (): void
returns void