export interface ITagNames { readonly storage: string; } export interface IWritableTagNames { storage?: string; } export interface IConfig { readonly autoTrigger: boolean; readonly triggerAttribute: string; readonly tagNames: ITagNames; } export interface IWritableConfig { autoTrigger?: boolean; triggerAttribute?: string; tagNames?: IWritableTagNames; } // wc-bindable protocol manifest types — single source of truth in /protocol/wc-bindable.ts. export type { IWcBindable, IWcBindableProperty, IWcBindableInput, IWcBindableCommand, } from "./protocol/wcBindable.js"; import type { WcsIoErrorInfo } from "./core/platformCapability.js"; export type StorageType = "local" | "session"; /** * Error returned when a storage operation fails. `operation` names the failing * call: `load` / `save` / `remove`, or `type` for an invalid `type` assignment * (a value other than `"local"` / `"session"`). */ export interface WcsStorageError { operation: "load" | "save" | "remove" | "type"; message: string; } /** * Value types for StorageCore (headless) — the async state properties. * Use with `bind()` from `a wc-bindable binding core` for compile-time type checking. */ export interface WcsStorageCoreValues { value: T; loading: boolean; error: WcsStorageError | Error | null; /** Additive failure taxonomy derived from `error` (stable code / phase / recoverable). */ errorInfo: WcsIoErrorInfo | null; } /** * Value types for the Shell (``) — extends Core with `trigger`. * Use with framework adapters for compile-time type checking. */ export interface WcsStorageValues extends WcsStorageCoreValues { trigger: boolean; }