@one-paragon/angular-utilities 2.4.5-beta.2 → 2.4.5-beta.4
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/index.d.ts
CHANGED
|
@@ -130,7 +130,8 @@ declare class RequestStateStore<TParam extends any[], V, R = null, T = R extends
|
|
|
130
130
|
$selectResponse: Signal<T | undefined>;
|
|
131
131
|
errorHandled: boolean;
|
|
132
132
|
onError(cb: (error: HttpErrorResponse) => void): this;
|
|
133
|
-
onErrorResponse(cb: (error: HttpErrorResponse, requestParams: [...TParam]) => void): this;
|
|
133
|
+
onErrorResponse(cb: (error: HttpErrorResponse, ...requestParams: [...TParam]) => void): this;
|
|
134
|
+
onErrorRequest(cb: (...requestParams: [...TParam]) => void): this;
|
|
134
135
|
onErrorWithRequest(func: (state: {
|
|
135
136
|
error: HttpErrorResponse;
|
|
136
137
|
requestParams: [...TParam];
|
|
@@ -143,15 +144,15 @@ declare class RequestStateStore<TParam extends any[], V, R = null, T = R extends
|
|
|
143
144
|
* if no handler was provided will call `console.log` with 'Success'
|
|
144
145
|
*/
|
|
145
146
|
useDefaultSuccessHandler(): this;
|
|
146
|
-
onSuccess(cb: (
|
|
147
|
-
onSuccessResponse(cb: (
|
|
147
|
+
onSuccess(cb: (response?: T) => void): this;
|
|
148
|
+
onSuccessResponse(cb: (response: T, ...requestParams: [...TParam]) => void): this;
|
|
148
149
|
onSuccessWithRequest(func: (state: {
|
|
149
150
|
requestParams: [...TParam];
|
|
150
151
|
body: T;
|
|
151
152
|
}) => void): this;
|
|
153
|
+
onSuccessRequest(cb: (...requestParams: [...TParam]) => void): this;
|
|
152
154
|
onSuccessOrError(cb: () => void): this;
|
|
153
155
|
private createRequest;
|
|
154
|
-
private subscriber;
|
|
155
156
|
private effectOnState;
|
|
156
157
|
/**
|
|
157
158
|
* @deprecated use the standalone subscriber helper function
|
|
@@ -176,7 +177,6 @@ declare class RequestStateStore<TParam extends any[], V, R = null, T = R extends
|
|
|
176
177
|
state$: Observable<RequestResponse<TParam, T>>;
|
|
177
178
|
selectRequestState$: Observable<RequestState<T>>;
|
|
178
179
|
selectResponse$: Observable<T>;
|
|
179
|
-
private selectSuccessOrError$;
|
|
180
180
|
/**
|
|
181
181
|
* @deprecated use selectRequestState$ instead
|
|
182
182
|
*/
|