UNPKG

@visactor/react-vtable

Version:
9 lines (8 loc) 594 B
import type { ReactNode } from 'react'; import React from 'react'; export declare const uid: (prefix?: string) => string; export declare const getDisplayName: (Comp: any) => any; export declare const typeOfComponent: (component: any, customTypeKey?: string) => string; export declare const toArray: <T = ReactNode, TC = ReactNode>(children: T) => TC[]; export declare const findAllByType: <T extends ReactNode, TC = unknown>(children: React.ReactNode, type: TC | TC[]) => T[]; export declare const findChildByType: <T extends ReactNode, TC = unknown>(children: React.ReactNode, type: TC) => T;