aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/utilities/rxjs.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-25 00:05:01 +0800
committerGitHub <noreply@github.com>2020-08-25 00:05:01 +0800
commit2867b65d2215ea89cca0e5c5cfbb536d08f60263 (patch)
tree07ae296c0c684fd81b30763ef9d6d27421de30b3 /Timeline/ClientApp/src/app/utilities/rxjs.ts
parent4eb7a984e10d15fdb8ef988e1571b114fa74e420 (diff)
parent86e22ca4fb7dceec43a528bd250bcda2a0133421 (diff)
downloadtimeline-2867b65d2215ea89cca0e5c5cfbb536d08f60263.tar.gz
timeline-2867b65d2215ea89cca0e5c5cfbb536d08f60263.tar.bz2
timeline-2867b65d2215ea89cca0e5c5cfbb536d08f60263.zip
Merge pull request #154 from crupest/toolchain
Upgrade toolchain of front end.
Diffstat (limited to 'Timeline/ClientApp/src/app/utilities/rxjs.ts')
-rw-r--r--Timeline/ClientApp/src/app/utilities/rxjs.ts28
1 files changed, 14 insertions, 14 deletions
diff --git a/Timeline/ClientApp/src/app/utilities/rxjs.ts b/Timeline/ClientApp/src/app/utilities/rxjs.ts
index 1be49164..0730b899 100644
--- a/Timeline/ClientApp/src/app/utilities/rxjs.ts
+++ b/Timeline/ClientApp/src/app/utilities/rxjs.ts
@@ -1,14 +1,14 @@
-import { OperatorFunction } from 'rxjs';
-import { catchError } from 'rxjs/operators';
-
-export function convertError<T, NewError>(
- oldErrorType: { new (...args: never[]): unknown },
- newErrorType: { new (): NewError }
-): OperatorFunction<T, T> {
- return catchError((error) => {
- if (error instanceof oldErrorType) {
- throw new newErrorType();
- }
- throw error;
- });
-}
+import { OperatorFunction } from "rxjs";
+import { catchError } from "rxjs/operators";
+
+export function convertError<T, NewError>(
+ oldErrorType: { new (...args: never[]): unknown },
+ newErrorType: { new (): NewError }
+): OperatorFunction<T, T> {
+ return catchError((error) => {
+ if (error instanceof oldErrorType) {
+ throw new newErrorType();
+ }
+ throw error;
+ });
+}