From e7e42434575f017b0fcd017a7c0f2cb872216e16 Mon Sep 17 00:00:00 2001 From: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com> Date: Mon, 21 Jun 2021 09:44:04 -0700 Subject: [PATCH] Clean up --- .../src/ui/context/polymorphic-component.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/components/src/ui/context/polymorphic-component.ts b/packages/components/src/ui/context/polymorphic-component.ts index 991d2eac118d90..fae6cc41418db8 100644 --- a/packages/components/src/ui/context/polymorphic-component.ts +++ b/packages/components/src/ui/context/polymorphic-component.ts @@ -29,19 +29,11 @@ export type PolymorphicComponent< IsPolymorphic extends boolean > = { < TT extends React.ElementType >( - props: PolymorphicComponentProps< - O, - TT, - IsPolymorphic extends true ? true : false - > & + props: PolymorphicComponentProps< O, TT, IsPolymorphic > & ( IsPolymorphic extends true ? { as: TT } : { as: never } ) ): JSX.Element | null; ( - props: PolymorphicComponentProps< - O, - T, - IsPolymorphic extends true ? true : false - > + props: PolymorphicComponentProps< O, T, IsPolymorphic > ): JSX.Element | null; displayName?: string; /**