MCPcopy Create free account
hub / github.com/SimplrJS/ts-docs-gen / CallableToString

Function CallableToString

packages/ts-docs-gen/src/api-items/api-callable.ts:62–79  ·  view source on GitHub ↗

* Example: ` (arg: TValue): void` * @param typeDefChar If empty string, return type is not shown. @default ": "

(render: ReferenceRenderHandler, typeDefChar: string = ": ")

Source from the content-addressed store, hash-verified

60 * @param typeDefChar If empty string, return type is not shown. @default ": "
61 */
62 protected CallableToString(render: ReferenceRenderHandler, typeDefChar: string = ": "): string {
63 // TypeParameters
64 const typeParametersString = this.TypeParametersToString(render);
65
66 // Parameters
67 const parametersString = this.ParametersToString(render);
68
69 // ReturnType
70 let returnTypeString: string;
71 if (typeDefChar !== "" && this.ReturnType != null) {
72 const type = this.SerializedTypeToString(render, this.ReturnType);
73 returnTypeString = `${typeDefChar}${type}`;
74 } else {
75 returnTypeString = "";
76 }
77
78 return `${typeParametersString}(${parametersString})${returnTypeString}`;
79 }
80
81 protected CallableToSimpleString(): string {
82 const parameters = this.Parameters.map(x => x.Name);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected