MCPcopy Index your code
hub / github.com/simstudioai/sim / isOpaqueSchemaNode

Function isOpaqueSchemaNode

apps/sim/executor/utils/block-reference.ts:91–102  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

89}
90
91function isOpaqueSchemaNode(value: unknown): boolean {
92 const node = asSchemaNode(value)
93 if (!node) return false
94 // A schema node whose nested shape isn't enumerated. Any path beneath it
95 // is accepted because there's no declared structure to validate against.
96 // `object` / `json` with declared `properties` are walked via lookupField.
97 if (node.type === 'any') return true
98 if ((node.type === 'json' || node.type === 'object') && node.properties === undefined) {
99 return true
100 }
101 return false
102}
103
104function isPathInSchema(schema: OutputSchema | undefined, pathParts: string[]): boolean {
105 if (!schema || pathParts.length === 0) {

Callers 1

isPathInSchemaFunction · 0.85

Calls 1

asSchemaNodeFunction · 0.85

Tested by

no test coverage detected