From d01c56f2aab37b216bc00e4ed218f710cb08b34c Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Thu, 3 Aug 2023 19:54:01 -0300 Subject: [PATCH] Rename the Guard to ComponentGuard at the internals (#8) --- packages/react/src/ComponentGuard.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/react/src/ComponentGuard.tsx b/packages/react/src/ComponentGuard.tsx index 24e08fc..9543b89 100644 --- a/packages/react/src/ComponentGuard.tsx +++ b/packages/react/src/ComponentGuard.tsx @@ -13,8 +13,11 @@ type Props, Tag extends string> = { taggedState: State; } & StateComponentProps; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function Guard, Tag extends string = any>( +function ComponentGuard< + State extends AnyTaggedState, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Tag extends string = any +>( props: Props ): React.ReactElement< React.ComponentProps[Tag]>, @@ -27,4 +30,4 @@ function Guard, Tag extends string = any>( return ; } -export default Guard; +export default ComponentGuard;