silgi 0.53.4 → 0.53.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/types.d.mts +7 -2
  2. package/package.json +1 -1
package/dist/types.d.mts CHANGED
@@ -98,8 +98,13 @@ interface ResolveContext<TCtx, TInput, TErrors extends ErrorDef> {
98
98
  type RouterDef = {
99
99
  [key: string]: ProcedureDef<any, any, any, any> | TaskDef<any, any> | RouterDef;
100
100
  };
101
- /** Return type wrapper — subscription yields, query/mutation returns Promise */
102
- type ProcedureResult<TType extends ProcedureType, TOutput> = TType extends 'subscription' ? AsyncIterableIterator<TOutput> : Promise<TOutput>;
101
+ /**
102
+ * Return type wrapper every procedure call resolves through the link's
103
+ * async `call`, so the client always returns a `Promise`. Subscriptions
104
+ * resolve to an `AsyncIterableIterator` (the open SSE/WS stream); queries
105
+ * and mutations resolve to the procedure's output value.
106
+ */
107
+ type ProcedureResult<TType extends ProcedureType, TOutput> = TType extends 'subscription' ? Promise<AsyncIterableIterator<TOutput>> : Promise<TOutput>;
103
108
  /** Infer client type from router */
104
109
  type InferClient<T> = T extends ProcedureDef<infer TType, infer TInput, infer TOutput> ? undefined extends TInput ? () => ProcedureResult<TType, TOutput> : (input: TInput) => ProcedureResult<TType, TOutput> : T extends Record<string, unknown> ? { [K in keyof T]: InferClient<T[K]> } : never;
105
110
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silgi",
3
- "version": "0.53.4",
3
+ "version": "0.53.5",
4
4
  "private": false,
5
5
  "description": "The fastest end-to-end type-safe RPC framework for TypeScript — compiled pipelines, single package, every runtime",
6
6
  "keywords": [