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

Function getResultTypeName

scripts/codegen/rust.ts:1806–1817  ·  view source on GitHub ↗
(
	method: RpcMethod,
	defCollections: DefinitionCollections,
)

Source from the content-addressed store, hash-verified

1804}
1805
1806function getResultTypeName(
1807 method: RpcMethod,
1808 defCollections: DefinitionCollections,
1809): string | null {
1810 const result = method.result as (JSONSchema7 & { $ref?: string }) | null;
1811 if (!result || isVoidSchema(result)) return null;
1812 if (typeof result.$ref === "string") {
1813 return refTypeName(result.$ref, defCollections);
1814 }
1815 if (typeof result.title === "string") return result.title;
1816 return `${toPascalCase(method.rpcMethod)}Result`;
1817}
1818
1819function methodUsesInternalSchema(
1820 schema: JSONSchema7 | null | undefined,

Callers 1

emitNamespaceMethodFunction · 0.85

Calls 3

isVoidSchemaFunction · 0.85
refTypeNameFunction · 0.85
toPascalCaseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…