Commit 93ecf41
committed
Narrow caught exceptions
The update from TypeScript 3.9.7 to 4.5.4 brings increased type strictness (introduced in 4.4). Previously, exceptions
were used in some catch blocks based on an assumption of their type. But exceptions can have any type and that now
results in errors (TS2345, TS2571). This is fixed by narrowing the exceptions to the expected type before using them as
such.1 parent 7c3b7b2 commit 93ecf41
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
0 commit comments