diff options
author | David Cho-Lerat <david.cho-lerat@sonarsource.com> | 2023-12-01 17:36:45 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-12-01 20:02:43 +0000 |
commit | a09640caa789513e1f533ffcb474a3541055e253 (patch) | |
tree | 67511f198da42e49714f4124fc23844274a0b4f0 /server/sonar-web/src/main/js/helpers/testUtils.ts | |
parent | d1531b2c4390c351746a311a6f85e66651879d23 (diff) | |
download | sonarqube-a09640caa789513e1f533ffcb474a3541055e253.tar.gz sonarqube-a09640caa789513e1f533ffcb474a3541055e253.zip |
Remove extra React.PropsWithChildren wrappers introduced by the React 18 codemod
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/testUtils.ts')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/testUtils.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/helpers/testUtils.ts b/server/sonar-web/src/main/js/helpers/testUtils.ts index d4b9704c79a..e9002780138 100644 --- a/server/sonar-web/src/main/js/helpers/testUtils.ts +++ b/server/sonar-web/src/main/js/helpers/testUtils.ts @@ -20,12 +20,10 @@ import { ComponentClass, FunctionComponent } from 'react'; export type ComponentPropsType< - T extends - | ComponentClass - | FunctionComponent<React.PropsWithChildren<React.PropsWithChildren<any>>>, + T extends ComponentClass | FunctionComponent<React.PropsWithChildren<any>>, > = T extends ComponentClass<infer P> ? P - : T extends FunctionComponent<React.PropsWithChildren<React.PropsWithChildren<infer P>>> + : T extends FunctionComponent<React.PropsWithChildren<infer P>> ? P : never; |