(node: Record<string, unknown>)
| 240 | } |
| 241 | |
| 242 | function collectRpcMethods(node: Record<string, unknown>): RpcMethod[] { |
| 243 | const results: RpcMethod[] = []; |
| 244 | for (const value of Object.values(node)) { |
| 245 | if (isRpcMethod(value)) { |
| 246 | results.push(value); |
| 247 | } else if (typeof value === "object" && value !== null) { |
| 248 | results.push(...collectRpcMethods(value as Record<string, unknown>)); |
| 249 | } |
| 250 | } |
| 251 | return results; |
| 252 | } |
| 253 | |
| 254 | export function normalizeSchemaForTypeScript(schema: JSONSchema7): JSONSchema7 { |
| 255 | const root = structuredClone(schema) as JSONSchema7 & { |
no test coverage detected
searching dependent graphs…