vovk 3.0.0-draft.4 → 3.0.0-draft.6
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/package.json +1 -1
- package/types.d.ts +18 -14
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -106,21 +106,24 @@ export type _VovkClientParams<T extends (options: OPTIONS) => _KnownAny, OPTIONS
|
|
|
106
106
|
} = Parameters<T>[0], P = _KnownAny> = Parameters<T>[0]['params'];
|
|
107
107
|
export type _VovkClientYieldType<T extends (...args: _KnownAny[]) => unknown> = T extends (...args: _KnownAny[]) => Promise<StreamAsyncIterator<infer Y>> ? Y : never;
|
|
108
108
|
export type _VovkClientReturnType<T extends (...args: _KnownAny) => unknown> = Awaited<ReturnType<T>>;
|
|
109
|
-
|
|
109
|
+
type ClientStaticMethod = ((...args: _KnownAny[]) => _KnownAny) & {
|
|
110
110
|
__isClientMethod: boolean;
|
|
111
|
-
}
|
|
112
|
-
export type
|
|
113
|
-
|
|
114
|
-
} ?
|
|
115
|
-
export type
|
|
116
|
-
|
|
117
|
-
} ?
|
|
118
|
-
export type
|
|
119
|
-
|
|
120
|
-
} ?
|
|
121
|
-
export type
|
|
122
|
-
|
|
123
|
-
} ?
|
|
111
|
+
};
|
|
112
|
+
export type _VovkBody<T extends ClientStaticMethod | _ControllerStaticMethod<REQ, PARAMS>, REQ extends _VovkRequest<undefined, _KnownAny> = Parameters<T>[0], PARAMS extends {
|
|
113
|
+
[key: string]: string;
|
|
114
|
+
} = _KnownAny> = T extends ClientStaticMethod ? _VovkClientBody<T> : T extends _ControllerStaticMethod<REQ, PARAMS> ? _VovkControllerBody<T, REQ, PARAMS> : never;
|
|
115
|
+
export type _VovkQuery<T extends ClientStaticMethod | _ControllerStaticMethod<REQ, PARAMS>, REQ extends _VovkRequest<undefined, _KnownAny> = Parameters<T>[0], PARAMS extends {
|
|
116
|
+
[key: string]: string;
|
|
117
|
+
} = _KnownAny> = T extends ClientStaticMethod ? _VovkClientQuery<T> : T extends _ControllerStaticMethod<REQ, PARAMS> ? _VovkControllerQuery<T, REQ, PARAMS> : never;
|
|
118
|
+
export type _VovkParams<T extends ClientStaticMethod | _ControllerStaticMethod<REQ, PARAMS>, REQ extends _VovkRequest<undefined, _KnownAny> = Parameters<T>[0], PARAMS extends {
|
|
119
|
+
[key: string]: string;
|
|
120
|
+
} = _KnownAny> = T extends ClientStaticMethod ? _VovkClientParams<T> : T extends _ControllerStaticMethod<REQ, PARAMS> ? _VovkControllerParams<T, REQ, PARAMS> : never;
|
|
121
|
+
export type _VovkYieldType<T extends ClientStaticMethod | _ControllerStaticMethod<REQ, PARAMS>, REQ extends _VovkRequest<undefined, _KnownAny> = Parameters<T>[0], PARAMS extends {
|
|
122
|
+
[key: string]: string;
|
|
123
|
+
} = _KnownAny> = T extends ClientStaticMethod ? _VovkClientYieldType<T> : T extends _ControllerStaticMethod<REQ, PARAMS> ? _VovkControlerYieldType<T, REQ, PARAMS> : never;
|
|
124
|
+
export type _VovkReturnType<T extends ClientStaticMethod | _ControllerStaticMethod<REQ, PARAMS>, REQ extends _VovkRequest<undefined, _KnownAny> = Parameters<T>[0], PARAMS extends {
|
|
125
|
+
[key: string]: string;
|
|
126
|
+
} = _KnownAny> = T extends ClientStaticMethod ? _VovkClientReturnType<T> : T extends _ControllerStaticMethod<REQ, PARAMS> ? _VovkControllerReturnType<T, REQ, PARAMS> : never;
|
|
124
127
|
export type _StreamAbortMessage = {
|
|
125
128
|
isError: true;
|
|
126
129
|
reason: _KnownAny;
|
|
@@ -185,3 +188,4 @@ export declare enum _HttpStatus {
|
|
|
185
188
|
GATEWAY_TIMEOUT = 504,
|
|
186
189
|
HTTP_VERSION_NOT_SUPPORTED = 505
|
|
187
190
|
}
|
|
191
|
+
export {};
|