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