(node: Record<string, unknown>)
| 577 | |
| 578 | /** Returns true when every leaf RPC method inside `node` is marked deprecated. */ |
| 579 | export function isNodeFullyDeprecated(node: Record<string, unknown>): boolean { |
| 580 | const methods: RpcMethod[] = []; |
| 581 | (function collect(n: Record<string, unknown>) { |
| 582 | for (const value of Object.values(n)) { |
| 583 | if (isRpcMethod(value)) { |
| 584 | methods.push(value); |
| 585 | } else if (typeof value === "object" && value !== null) { |
| 586 | collect(value as Record<string, unknown>); |
| 587 | } |
| 588 | } |
| 589 | })(node); |
| 590 | return methods.length > 0 && methods.every(m => m.deprecated === true); |
| 591 | } |
| 592 | |
| 593 | /** |
| 594 | * Returns a filtered copy of an API tree containing only methods whose visibility |
no test coverage detected
searching dependent graphs…