MCPcopy Index your code
hub / github.com/anomalyco/opencode / configData

Function configData

packages/tui/src/util/error.ts:86–91  ·  view source on GitHub ↗
(input: unknown, tag: string)

Source from the content-addressed store, hash-verified

84}
85
86function configData(input: unknown, tag: string) {
87 if (!isRecord(input)) return undefined
88 if (input.name === tag && isRecord(input.data)) return input.data
89 if (input._tag === tag) return input
90 return undefined
91}
92
93function field(input: Record<string, unknown>, key: string) {
94 return typeof input[key] === "string" ? input[key] : undefined

Callers 1

cliErrorMessageFunction · 0.70

Calls 1

isRecordFunction · 0.90

Tested by

no test coverage detected