Template
1
0

feat: minor cleanup and doc update

This commit is contained in:
2025-04-21 00:27:34 +00:00
parent 3b9a5cb456
commit 22325285be
5 changed files with 38 additions and 40 deletions

View File

@@ -16,15 +16,6 @@ export class Relay<TProcedures extends Procedures, TProcedureIndex = ProcedureIn
indexProcedures(procedures, this.#index);
}
/**
* Retrieve a registered procedure registered with the relay instance.
*
* @param method - Method name assigned to the procedure.
*/
procedure<TMethod extends keyof TProcedureIndex>(method: TMethod): TProcedureIndex[TMethod] {
return this.#index.get(method) as TProcedureIndex[TMethod];
}
/**
* Create a new relay client instance from the instance procedures.
*
@@ -33,6 +24,15 @@ export class Relay<TProcedures extends Procedures, TProcedureIndex = ProcedureIn
client(config: RelayClientConfig): this["$inferClient"] {
return makeRelayClient(config, this.procedures) as any;
}
/**
* Retrieve a registered procedure registered with the relay instance.
*
* @param method - Method name assigned to the procedure.
*/
method<TMethod extends keyof TProcedureIndex>(method: TMethod): TProcedureIndex[TMethod] {
return this.#index.get(method) as TProcedureIndex[TMethod];
}
}
/*