Skip to content

Commit

Permalink
fix: export additional types for end-users
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Apr 15, 2022
1 parent 5477d9d commit 61f9abf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export type ComponentWithConditionPropsAsyncSupport<C extends 'with-function-chi

export type FCWithImplicitChildren<P = NonNullObject> = FunctionComponentWithImplicitChildren<P>;

interface FunctionComponentWithImplicitChildren<P = NonNullObject> {
export interface FunctionComponentWithImplicitChildren<P = NonNullObject> {
(props: CustomPropsWithChildren<P>, context?: any): ReactElement<any, any> | null;
propTypes?: WeakValidationMap<P> | undefined;
contextTypes?: ValidationMap<any> | undefined;
Expand All @@ -69,6 +69,6 @@ interface FunctionComponentWithImplicitChildren<P = NonNullObject> {
}

// eslint-disable-next-line @typescript-eslint/ban-types
type NonNullObject = {} & object;
export type NonNullObject = {} & object;

export type CustomPropsWithChildren<P> = P & { children?: ReactNode | undefined | ((...args: unknown[]) => JSX.Element) };

0 comments on commit 61f9abf

Please sign in to comment.