Add passing exhaustive-deps test for type parameters in TypeScript (#20432)
Sebastian Silbermann committed
Mar 14, 2024 at 15:41 UTC
a540f536162f9ddcce5bb63260e99b21eb603744
1 file changed
+10
packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js
+10
@@ -7774,6 +7774,16 @@ const testsTypescript = {
7774
}
7775
`,
7776
},
7777
+ {
7778
+ code: normalizeIndent`
7779
+ function useMyThing<T>(): void {
7780
+ useEffect(() => {
7781
+ let foo: T;
7782
+ console.log(foo);
7783
+ }, []);
7784
+ }
7785
+ `,
7786
+ },
7787
],
7788
invalid: [
7789
{