@tstdl/base 0.92.163 → 0.92.165
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.
- package/api/types.d.ts +1 -1
- package/package.json +1 -1
package/api/types.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ export type ApiEndpointParametersSchema<T extends ApiDefinition, K extends ApiEn
|
|
|
93
93
|
export type ApiEndpointBodySchema<T extends ApiDefinition, K extends ApiEndpointKeys<T>> = NonUndefinable<ApiEndpoint<T, K>['body']>;
|
|
94
94
|
export type ApiEndpointResultSchema<T extends ApiDefinition, K extends ApiEndpointKeys<T>> = NonUndefinable<ApiEndpoint<T, K>['result']>;
|
|
95
95
|
export type ApiBinaryType = typeof Uint8Array | typeof Blob | typeof ReadableStream;
|
|
96
|
-
export type ApiInputType<T extends SchemaTestable> = T extends
|
|
96
|
+
export type ApiInputType<T extends SchemaTestable> = T extends ApiBinaryType ? InstanceType<Exclude<ApiBinaryType, typeof ReadableStream> | typeof ReadableStream<Uint8Array<ArrayBuffer>>> : T extends typeof ServerSentEvents ? ServerSentEventsSource : T extends typeof DataStream<infer U> ? AsyncIterable<U> : T extends SchemaTestable ? SchemaOutput<T> : never;
|
|
97
97
|
export type ApiOutputType<T extends SchemaTestable> = T extends typeof ReadableStream ? ReadableStream<Uint8Array<ArrayBuffer>> : T extends typeof DataStream<infer U> ? Observable<U> : T extends SchemaTestable ? SchemaOutput<T> : never;
|
|
98
98
|
export type ApiParameters<T extends ApiDefinition, K extends ApiEndpointKeys<T>> = ApiInputType<ApiEndpointParametersSchema<T, K>>;
|
|
99
99
|
export type ApiClientBody<T extends ApiDefinition, K extends ApiEndpointKeys<T>> = ApiInputType<ApiEndpointBodySchema<T, K>>;
|