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

Function pushTsRpcMethodJsDoc

scripts/codegen/typescript.ts:95–123  ·  view source on GitHub ↗
(
    lines: string[],
    indent: string,
    method: RpcMethod,
    options: {
        summaryFallback?: string;
        paramsName?: string;
        paramsDescription?: string;
        includeDeprecated?: boolean;
        includeExperimental?: boolean;
    } = {}
)

Source from the content-addressed store, hash-verified

93}
94
95function pushTsRpcMethodJsDoc(
96 lines: string[],
97 indent: string,
98 method: RpcMethod,
99 options: {
100 summaryFallback?: string;
101 paramsName?: string;
102 paramsDescription?: string;
103 includeDeprecated?: boolean;
104 includeExperimental?: boolean;
105 } = {}
106): void {
107 const entries: string[] = [];
108 entries.push(method.description ?? options.summaryFallback ?? `Calls \`${method.rpcMethod}\`.`);
109 if (options.paramsName && options.paramsDescription) {
110 entries.push(`@param ${options.paramsName} ${options.paramsDescription}`);
111 }
112 const resultDescription = rpcResultDescription(method);
113 if (resultDescription) {
114 entries.push(`@returns ${resultDescription}`);
115 }
116 if (options.includeDeprecated) {
117 entries.push("@deprecated");
118 }
119 if (options.includeExperimental) {
120 entries.push("@experimental");
121 }
122 pushTsJsDoc(lines, indent, entries);
123}
124
125function toPascalCase(s: string): string {
126 return fixBrandCasing(s.charAt(0).toUpperCase() + s.slice(1));

Callers 3

emitGroupFunction · 0.85

Calls 3

pushTsJsDocFunction · 0.85
rpcResultDescriptionFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…