import type { PropsWithChildren, ReactElement, ReactNode, ValidationMap, WeakValidationMap } from "react"; /** * Type for a value that can properly be parsed by `Boolean(...)` */ export type BooleanLike = boolean | string | number | null | undefined | ExtendablePromise; /** * A Promise that can have additional properties */ export interface ExtendablePromise extends Promise { [index: string]: any; } /** * Type for a promise that is cancellable */ export interface CancellablePromise { promise: ExtendablePromise; cancel: () => void; } /** * Props for a React component that have both children * as well as a `condition` prop that is supported by this library * * The children can also be in function style */ export type ComponentWithConditionPropsWithFunctionChildren

= P & CustomPropsWithChildren<{ condition: (() => BooleanLike) | BooleanLike; }>; /** * Props for a React component that have both children * as well as a `condition` prop that is supported by this library */ export type ComponentWithConditionProps

= P & PropsWithChildren<{ condition: (() => BooleanLike) | BooleanLike; }>; /** * Async related props */ export interface AsyncSupportProps { /** * - False (default): promises are cancelled before each unmount * - True: promises can be fulfilled even after a * component unmount or a change to promise prop */ keepAlive?: boolean; } /** * Extend ComponentWithConditionProps * to also support async */ export type ComponentWithConditionPropsAsyncSupport = ComponentWithConditionProps; export type FCWithImplicitChildren

= FunctionComponentWithImplicitChildren

; export interface FunctionComponentWithImplicitChildren

{ (props: CustomPropsWithChildren

, context?: any): ReactElement | null; propTypes?: WeakValidationMap

| undefined; contextTypes?: ValidationMap | undefined; defaultProps?: Partial

| undefined; displayName?: string | undefined; } export type NonNullObject = {} & object; export type CustomPropsWithChildren

= P & { children?: ReactNode | undefined | ((...args: unknown[]) => JSX.Element); }; //# sourceMappingURL=types.d.ts.map