diff --git a/.vscode/launch.json b/.vscode/launch.json index 84a46571f54ff4..60b257dfd879b7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,8 @@ "request": "launch", "name": "Debug test", "program": "${workspaceRoot}/node_modules/jest/bin/jest.js", - "args": ["test/index.test.ts"] + "args": ["test/index.test.ts"], + "skipFiles": ["${workspaceFolder}/node_modules/**/*.js", "/**/*.js"] } ] } diff --git a/README.md b/README.md index 7c30cc0624025d..cf5feae83057c3 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ npm install typescript-to-proptypes --save-dev | Function | :heavy_check_mark: | | Const functions | :heavy_check_mark: | | React.memo | :heavy_check_mark: | -| React.ForwardRef | :x: | +| React.ForwardRef | :heavy_check_mark: | ## License diff --git a/src/parser.ts b/src/parser.ts index dbe1e9ef3888dc..1fdde4db4d1a29 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -114,7 +114,7 @@ export function parseFromProgram( node.moduleSpecifier.text === 'react' && node.importClause ) { - const imports = ['Component', 'PureComponent', 'memo']; + const imports = ['Component', 'PureComponent', 'memo', 'forwardRef']; // import x from 'react' if (node.importClause.name) {