( node: Record<string, unknown>, prefix = "", )
| 1284 | // ── API types generation ──────────────────────────────────────────────────── |
| 1285 | |
| 1286 | function collectRpcMethods( |
| 1287 | node: Record<string, unknown>, |
| 1288 | prefix = "", |
| 1289 | ): RpcMethod[] { |
| 1290 | const methods: RpcMethod[] = []; |
| 1291 | for (const [key, value] of Object.entries(node)) { |
| 1292 | if (isRpcMethod(value)) { |
| 1293 | methods.push(value); |
| 1294 | } else if (typeof value === "object" && value !== null) { |
| 1295 | methods.push( |
| 1296 | ...collectRpcMethods( |
| 1297 | value as Record<string, unknown>, |
| 1298 | prefix ? `${prefix}.${key}` : key, |
| 1299 | ), |
| 1300 | ); |
| 1301 | } |
| 1302 | } |
| 1303 | return methods; |
| 1304 | } |
| 1305 | |
| 1306 | function rustParamsTypeName( |
| 1307 | method: RpcMethod, |
no test coverage detected
searching dependent graphs…