import type { ReactElement, ReactNode, Ref } from '../core'
export const REACT_MEMO_TYPE = Symbol.for('react.memo')
export const REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref')
export const REACT_LAZY_TYPE = Symbol.for('react.lazy')
// Component-shaped return type so JSX usage of memo/forwardRef/lazy results
// type-checks. The runtime value is a `$$typeof`-tagged record that the
// reconciler recognizes via type-matchers; the cast lets TypeScript treat
// it as a callable component at JSX sites without changing what the runtime
// actually does. `children` is included for the common
// `
= (( props: P & { children?: ReactNode; ref?: any; key?: any }, ) => ReactElement | null) & { readonly $$typeof: symbol } export function memo
( type: (props: P) => any, areEqual?: (prev: Readonly
, next: Readonly
) => boolean, ): ExoticComponent
{ return { $$typeof: REACT_MEMO_TYPE, type, compare: areEqual ?? null } as unknown as ExoticComponent
}
export function forwardRef }> {
return { $$typeof: REACT_FORWARD_REF_TYPE, render } as unknown as ExoticComponent }>
}
export function lazy