File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/transforms/v2-to-v3/apis Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " aws-sdk-js-codemod " : patch
3
+ ---
4
+
5
+ Remove type assertion for TryStatement
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import type {
5
5
Collection ,
6
6
FunctionExpression ,
7
7
JSCodeshift ,
8
- TryStatement ,
9
8
} from "jscodeshift" ;
10
9
11
10
import type { ClientIdentifier } from "../types" ;
@@ -59,7 +58,7 @@ export const renameErrorCodeWithName = (
59
58
60
59
// Replace error.code with error.name in try-catch clauses.
61
60
callExpressions . forEach ( ( callExpression ) => {
62
- const tryStatement = j ( callExpression ) . closest ( j . TryStatement ) . nodes ( ) [ 0 ] as TryStatement ;
61
+ const tryStatement = j ( callExpression ) . closest ( j . TryStatement ) . nodes ( ) [ 0 ] ;
63
62
64
63
if ( ! tryStatement || ! tryStatement . handler ) {
65
64
return ;
You can’t perform that action at this time.
0 commit comments