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 {
55 Collection ,
66 FunctionExpression ,
77 JSCodeshift ,
8- TryStatement ,
98} from "jscodeshift" ;
109
1110import type { ClientIdentifier } from "../types" ;
@@ -59,7 +58,7 @@ export const renameErrorCodeWithName = (
5958
6059 // Replace error.code with error.name in try-catch clauses.
6160 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 ] ;
6362
6463 if ( ! tryStatement || ! tryStatement . handler ) {
6564 return ;
You can’t perform that action at this time.
0 commit comments