MCPcopy Index your code
hub / github.com/github/copilot-sdk / collectRpcMethods

Function collectRpcMethods

scripts/codegen/rust.ts:1286–1304  ·  view source on GitHub ↗
(
	node: Record<string, unknown>,
	prefix = "",
)

Source from the content-addressed store, hash-verified

1284// ── API types generation ────────────────────────────────────────────────────
1285
1286function 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
1306function rustParamsTypeName(
1307 method: RpcMethod,

Callers 2

generateApiTypesCodeFunction · 0.70
generateRpcCodeFunction · 0.70

Calls 2

isRpcMethodFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…