Skip to content

Commit

Permalink
Fix typo in excluding-props.md (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
habipakyol committed Oct 31, 2023
1 parent 53d9a7a commit 41b4ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/hoc/excluding-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function withInjectedProps<U extends Record<string, unknown>>(
) {
return function <T extends U>(Component: React.ComponentType<T>) {
return function (props: Omit<T, keyof U>): React.JSX.Element {
//A type coercion is neccessary because TypeScript doesn't know that the Omit<T, keyof U> + {...injectedProps} = T
//A type coercion is necessary because TypeScript doesn't know that the Omit<T, keyof U> + {...injectedProps} = T
const newProps = { ...props, ...injectedProps } as T;
return <Component {...newProps} />;
};
Expand Down

0 comments on commit 41b4ac3

Please sign in to comment.