Skip to content

Commit 1ae05d8

Browse files
fix: Update tooling deps and tighten PolymorphicProps check
1 parent 6e766c1 commit 1ae05d8

3 files changed

Lines changed: 798 additions & 1812 deletions

File tree

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {
22
Attributes,
3-
ComponentPropsWithRef,
43
ComponentPropsWithoutRef,
4+
ComponentPropsWithRef,
55
ElementType,
66
ExoticComponent,
77
FC,
@@ -31,7 +31,7 @@ export type PolymorphicProps<
3131
> = Merge<
3232
T extends keyof JSX.IntrinsicElements ? PropsWithoutRef<JSX.IntrinsicElements[T]> : ComponentPropsWithoutRef<T>,
3333
// cover cases where the allowed ElementType and allowed DOM nodes overlap and are the same
34-
T extends S ? PropsWithAs<P, S> : PropsWithAs<P, T>
34+
[T] extends [S] ? PropsWithAs<P, S> : PropsWithAs<P, T>
3535
> &
3636
Attributes;
3737

0 commit comments

Comments
 (0)