Skip to content

Commit

Permalink
Rename the Guard to ComponentGuard at the internals (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
MOZGIII authored Aug 3, 2023
1 parent c2bd0b6 commit d01c56f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/react/src/ComponentGuard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ type Props<State extends AnyTaggedState<Tag>, Tag extends string> = {
taggedState: State;
} & StateComponentProps<State, Tag>;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
function Guard<State extends AnyTaggedState<Tag>, Tag extends string = any>(
function ComponentGuard<
State extends AnyTaggedState<Tag>,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Tag extends string = any
>(
props: Props<State, Tag>
): React.ReactElement<
React.ComponentProps<StateComponentProps<State>[Tag]>,
Expand All @@ -27,4 +30,4 @@ function Guard<State extends AnyTaggedState<Tag>, Tag extends string = any>(
return <Component {...data} />;
}

export default Guard;
export default ComponentGuard;

0 comments on commit d01c56f

Please sign in to comment.