From db58664992fde65af79c8aa778c9e4bfd807d072 Mon Sep 17 00:00:00 2001 From: Thet Naing Tun Date: Mon, 13 Feb 2023 19:06:44 +0700 Subject: [PATCH] refactor: use proper type for switch forward ref (#2277) --- packages/@headlessui-react/src/components/switch/switch.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/@headlessui-react/src/components/switch/switch.tsx b/packages/@headlessui-react/src/components/switch/switch.tsx index 9e07285..71e6b31 100644 --- a/packages/@headlessui-react/src/components/switch/switch.tsx +++ b/packages/@headlessui-react/src/components/switch/switch.tsx @@ -111,7 +111,7 @@ let SwitchRoot = forwardRefWithAs(function Switch< name?: string value?: string }, - ref: Ref + ref: Ref ) { let internalId = useId() let { @@ -128,7 +128,6 @@ let SwitchRoot = forwardRefWithAs(function Switch< let switchRef = useSyncRefs( internalSwitchRef, ref, - // @ts-expect-error figure out the correct type here groupContext === null ? null : groupContext.setSwitch )