MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / readStyleId

Function readStyleId

packages/extension/mcp/tools/code/cache/node-semantics.ts:71–75  ·  view source on GitHub ↗
(node: SceneNode, key: 'fillStyleId' | 'strokeStyleId')

Source from the content-addressed store, hash-verified

69 if (value == null) return { kind: 'missing' }
70 if (!Array.isArray(value)) return { kind: 'unsupported', value }
71 return { kind: 'array', paints: value }
72}
73
74function readStyleId(node: SceneNode, key: 'fillStyleId' | 'strokeStyleId'): string | null {
75 if (!(key in node)) return null
76 const value = (node as { fillStyleId?: unknown; strokeStyleId?: unknown })[key]
77 return typeof value === 'string' && value.length > 0 ? value : null
78}

Callers 1

getNodeSemanticsCachedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected