@rnw-community/rxjs-errors 0.57.3 → 0.59.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/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/operator/filter-with-exception-operator/filter-with-exception.operator.d.ts +7 -0
- package/dist/cjs/operator/filter-with-exception-operator/filter-with-exception.operator.d.ts.map +1 -0
- package/dist/cjs/{filter-with-exception.operator.js → operator/filter-with-exception-operator/filter-with-exception.operator.js} +3 -2
- package/dist/cjs/operator/filter-with-exception-operator/filter-with-exception.operator.js.map +1 -0
- package/dist/cjs/operator/rethrow-exception-operator/rethrow-exception.operator.d.ts +8 -0
- package/dist/cjs/operator/rethrow-exception-operator/rethrow-exception.operator.d.ts.map +1 -0
- package/dist/cjs/operator/rethrow-exception-operator/rethrow-exception.operator.js +14 -0
- package/dist/cjs/operator/rethrow-exception-operator/rethrow-exception.operator.js.map +1 -0
- package/dist/cjs/rxjs-filter-error.d.ts +3 -0
- package/dist/cjs/rxjs-filter-error.d.ts.map +1 -1
- package/dist/cjs/rxjs-filter-error.js +3 -0
- package/dist/cjs/rxjs-filter-error.js.map +1 -1
- package/dist/cjs/tsconfig.build-cjs.tsbuildinfo +1 -1
- package/dist/cjs/type/create-error-fn.type.d.ts +4 -0
- package/dist/cjs/type/create-error-fn.type.d.ts.map +1 -0
- package/dist/cjs/type/create-error-fn.type.js +6 -0
- package/dist/cjs/type/create-error-fn.type.js.map +1 -0
- package/dist/cjs/type/error-code-or-msg-fn.type.d.ts +2 -0
- package/dist/cjs/type/error-code-or-msg-fn.type.d.ts.map +1 -0
- package/dist/cjs/type/error-code-or-msg-fn.type.js +3 -0
- package/dist/cjs/type/error-code-or-msg-fn.type.js.map +1 -0
- package/dist/cjs/type/error-ctor.type.d.ts +2 -0
- package/dist/cjs/type/error-ctor.type.d.ts.map +1 -0
- package/dist/cjs/type/error-ctor.type.js +3 -0
- package/dist/cjs/type/error-ctor.type.js.map +1 -0
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/operator/filter-with-exception-operator/filter-with-exception.operator.d.ts +7 -0
- package/dist/esm/operator/filter-with-exception-operator/filter-with-exception.operator.d.ts.map +1 -0
- package/dist/esm/operator/filter-with-exception-operator/filter-with-exception.operator.js +8 -0
- package/dist/esm/operator/filter-with-exception-operator/filter-with-exception.operator.js.map +1 -0
- package/dist/esm/operator/rethrow-exception-operator/rethrow-exception.operator.d.ts +8 -0
- package/dist/esm/operator/rethrow-exception-operator/rethrow-exception.operator.d.ts.map +1 -0
- package/dist/esm/operator/rethrow-exception-operator/rethrow-exception.operator.js +10 -0
- package/dist/esm/operator/rethrow-exception-operator/rethrow-exception.operator.js.map +1 -0
- package/dist/esm/rxjs-filter-error.d.ts +3 -0
- package/dist/esm/rxjs-filter-error.d.ts.map +1 -1
- package/dist/esm/rxjs-filter-error.js +3 -0
- package/dist/esm/rxjs-filter-error.js.map +1 -1
- package/dist/esm/tsconfig.build-esm.tsbuildinfo +1 -1
- package/dist/esm/type/create-error-fn.type.d.ts +4 -0
- package/dist/esm/type/create-error-fn.type.d.ts.map +1 -0
- package/dist/esm/type/create-error-fn.type.js +2 -0
- package/dist/esm/type/create-error-fn.type.js.map +1 -0
- package/dist/esm/type/error-code-or-msg-fn.type.d.ts +2 -0
- package/dist/esm/type/error-code-or-msg-fn.type.d.ts.map +1 -0
- package/dist/esm/type/error-code-or-msg-fn.type.js +2 -0
- package/dist/esm/type/error-code-or-msg-fn.type.js.map +1 -0
- package/dist/esm/type/error-ctor.type.d.ts +2 -0
- package/dist/esm/type/error-ctor.type.d.ts.map +1 -0
- package/dist/esm/type/error-ctor.type.js +2 -0
- package/dist/esm/type/error-ctor.type.js.map +1 -0
- package/package.json +4 -4
- package/dist/cjs/filter-with-exception.operator.d.ts +0 -4
- package/dist/cjs/filter-with-exception.operator.d.ts.map +0 -1
- package/dist/cjs/filter-with-exception.operator.js.map +0 -1
- package/dist/cjs/rethrow-exception.operator.d.ts +0 -4
- package/dist/cjs/rethrow-exception.operator.d.ts.map +0 -1
- package/dist/cjs/rethrow-exception.operator.js +0 -17
- package/dist/cjs/rethrow-exception.operator.js.map +0 -1
- package/dist/esm/filter-with-exception.operator.d.ts +0 -4
- package/dist/esm/filter-with-exception.operator.d.ts.map +0 -1
- package/dist/esm/filter-with-exception.operator.js +0 -7
- package/dist/esm/filter-with-exception.operator.js.map +0 -1
- package/dist/esm/rethrow-exception.operator.d.ts +0 -4
- package/dist/esm/rethrow-exception.operator.d.ts.map +0 -1
- package/dist/esm/rethrow-exception.operator.js +0 -13
- package/dist/esm/rethrow-exception.operator.js.map +0 -1
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { OperatorFunction } from 'rxjs';
|
|
2
|
-
export type FilterWithExceptionOperator = <TInput, TOutput extends TInput = TInput>(passingCondition: ((val: TInput) => boolean) | ((val: TInput) => val is TOutput), errorStringOrMsgFn: string | ((val: TInput) => string), createError?: (msg: string) => Error) => OperatorFunction<TInput, TOutput>;
|
|
3
|
-
export declare const filterWithException: FilterWithExceptionOperator;
|
|
4
|
-
//# sourceMappingURL=filter-with-exception.operator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-with-exception.operator.d.ts","sourceRoot":"","sources":["../../src/filter-with-exception.operator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE7C,MAAM,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,MAAM,GAAG,MAAM,EAC9E,gBAAgB,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,IAAI,OAAO,CAAC,EAChF,kBAAkB,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,EACtD,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,KACnC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEvC,eAAO,MAAM,mBAAmB,EAAE,2BAWzB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { of, throwError } from 'rxjs';
|
|
2
|
-
import { concatMap } from 'rxjs/operators';
|
|
3
|
-
import { RxJSFilterError } from './rxjs-filter-error';
|
|
4
|
-
export const filterWithException = (passingCondition, errorCodeOrMsgFn, createError = (msg) => new RxJSFilterError(msg)) => source$ => source$.pipe(concatMap(val => passingCondition(val)
|
|
5
|
-
? of(val)
|
|
6
|
-
: throwError(() => createError(typeof errorCodeOrMsgFn === 'string' ? errorCodeOrMsgFn : errorCodeOrMsgFn(val)))));
|
|
7
|
-
//# sourceMappingURL=filter-with-exception.operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-with-exception.operator.js","sourceRoot":"","sources":["../../src/filter-with-exception.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAUtD,MAAM,CAAC,MAAM,mBAAmB,GAC5B,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,EAAE,CAChG,OAAO,CAAC,EAAE,CACN,OAAO,CAAC,IAAI,CACR,SAAS,CAAC,GAAG,CAAC,EAAE,CACZ,gBAAgB,CAAC,GAAG,CAAC;IACjB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC;IACT,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CACZ,WAAW,CAAC,OAAO,gBAAgB,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAC/F,CACV,CACJ,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Observable } from 'rxjs';
|
|
2
|
-
export type RethrowExceptionOperator = <T>(errStringOrMessageFn: string | ((err: unknown) => string), logFn?: (msg: string) => void, ErrorCtor?: new (msg: string, ...args: never[]) => Error, createError?: (msg: string) => Error) => (source$: Observable<T>) => Observable<T>;
|
|
3
|
-
export declare const rethrowException: RethrowExceptionOperator;
|
|
4
|
-
//# sourceMappingURL=rethrow-exception.operator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rethrow-exception.operator.d.ts","sourceRoot":"","sources":["../../src/rethrow-exception.operator.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,EACrC,oBAAoB,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,CAAC,EACzD,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC7B,SAAS,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,KAAK,EACxD,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,KACnC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC;AAO/C,eAAO,MAAM,gBAAgB,EAAE,wBAiB9B,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { catchError, throwError } from 'rxjs';
|
|
2
|
-
import { getErrorMessage, isDefined } from '@rnw-community/shared';
|
|
3
|
-
import { RxJSFilterError } from './rxjs-filter-error';
|
|
4
|
-
const defaultErrorCreator = (ErrorCtor) => (msg) => new ErrorCtor(msg);
|
|
5
|
-
export const rethrowException = (errStringOrMessageFn, logFn, ErrorCtor = RxJSFilterError, createError = defaultErrorCreator(ErrorCtor)) => {
|
|
6
|
-
const getErrorMessageString = (err) => typeof errStringOrMessageFn === 'string' ? errStringOrMessageFn : errStringOrMessageFn(err);
|
|
7
|
-
return source$ => source$.pipe(catchError((err) => {
|
|
8
|
-
if (isDefined(logFn))
|
|
9
|
-
logFn(`${getErrorMessageString(err)}: ${getErrorMessage(err)}`);
|
|
10
|
-
return throwError(() => (err instanceof ErrorCtor ? err : createError(getErrorMessageString(err))));
|
|
11
|
-
}));
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=rethrow-exception.operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rethrow-exception.operator.js","sourceRoot":"","sources":["../../src/rethrow-exception.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAWtD,MAAM,mBAAmB,GACrB,CAAC,SAAqC,EAAE,EAAE,CAC1C,CAAC,GAAW,EAAS,EAAE,CACnB,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;AAE3B,MAAM,CAAC,MAAM,gBAAgB,GAA6B,CACtD,oBAAoB,EACpB,KAAK,EACL,SAAS,GAAG,eAAe,EAC3B,WAAW,GAAG,mBAAmB,CAAC,SAAS,CAAC,EAC9C,EAAE;IACA,MAAM,qBAAqB,GAAG,CAAC,GAAY,EAAU,EAAE,CACnD,OAAO,oBAAoB,KAAK,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAEhG,OAAO,OAAO,CAAC,EAAE,CACb,OAAO,CAAC,IAAI,CACR,UAAU,CAAC,CAAC,GAAY,EAAE,EAAE;QACxB,IAAI,SAAS,CAAC,KAAK,CAAC;YAAE,KAAK,CAAC,GAAG,qBAAqB,CAAC,GAAG,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEtF,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,YAAY,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACxG,CAAC,CAAC,CACL,CAAC;AACV,CAAC,CAAC"}
|