(
lines: string[],
indent: string,
method: RpcMethod,
options: {
summaryFallback?: string;
paramsName?: string;
paramsDescription?: string;
includeDeprecated?: boolean;
includeExperimental?: boolean;
} = {}
)
| 93 | } |
| 94 | |
| 95 | function 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 | |
| 125 | function toPascalCase(s: string): string { |
| 126 | return fixBrandCasing(s.charAt(0).toUpperCase() + s.slice(1)); |
no test coverage detected
searching dependent graphs…