MCPcopy Create free account
hub / github.com/Shitanshukumar607/Drawspace / ToolPropertiesState

Interface ToolPropertiesState

context/toolPropertiesStore.ts:142–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140export type ToolKey = keyof ToolPropertiesMap;
141
142export interface ToolPropertiesState {
143 // partial because you might not want to set all tools, but we initialize all on creation
144 properties: Partial<{ [K in ToolKey]: ToolPropertiesMap[K] }>;
145
146 // Update method typed per-tool
147 updateProperties: <K extends ToolKey>(
148 tool: K,
149 updates: Partial<ToolPropertiesMap[K]>
150 ) => void;
151
152 // Reset a single tool to its defaults
153 resetProperties: <K extends ToolKey>(tool: K) => void;
154
155 // Reset all tools
156 resetAll: () => void;
157}
158
159/**
160 * Build initial properties object (pre-fill every known tool with its defaults).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected