diff --git a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js index 2f9764a74db19..d40faf002b299 100644 --- a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js +++ b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js @@ -7722,6 +7722,16 @@ const testsTypescript = { } `, }, + { + code: normalizeIndent` + function useMyThing(): void { + useEffect(() => { + let foo: T; + console.log(foo); + }, []); + } + `, + }, ], invalid: [ {