Skip to content

Commit 762ee60

Browse files
chore: Fix possibly infinite instantiations of composable polymorphic components
1 parent c92ce4d commit 762ee60

File tree

5 files changed

+605
-2596
lines changed

5 files changed

+605
-2596
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type PolymorphicProps<
3535
> = Merge<
3636
T extends keyof JSX.IntrinsicElements ? PropsWithoutRef<JSX.IntrinsicElements[T]> : ComponentPropsWithoutRef<T>,
3737
// cover cases where the allowed ElementType and allowed DOM nodes overlap and are the same
38-
T extends S ? PropsWithAs<P, T, T> : PropsWithAs<P, T, S>
38+
T extends S ? PropsWithAs<P, S> : PropsWithAs<P, T, S>
3939
> &
4040
Attributes;
4141

0 commit comments

Comments
 (0)