Skip to content

Commit e566941

Browse files
yuanjackie1MarkTeetsjasnoominzo-kim
committed
changes in TS for statePropExtractors
Co-authored-by: Mark Teets <[email protected]> Co-authored-by: Jasmine <[email protected]> Co-authored-by: Minzo Kim <[email protected]>
1 parent adbdc44 commit e566941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/controllers/statePropExtractors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function getHooksNames(elementType: string): { hookName: string; varName:
100100
* Other types: "BlockStatement" / "ExpressionStatement" / "ReturnStatement"
101101
* Iterate through AST of every functional component declaration
102102
* Check within each functional component declaration if there are hook declarations & variable name declaration */
103-
AST.forEach((functionDec: any) => {
103+
AST.forEach((functionDec: {expression: {body: {body: {}}}, body: {body: {}}}) => {
104104
let declarationBody: any;
105105
if (functionDec.expression?.body) declarationBody = functionDec.expression.body.body;
106106
// check if functionDec.expression.body exists, then set declarationBody to functionDec's body

0 commit comments

Comments
 (0)