@visactor/react-vtable
Version:
The react version of VTable
9 lines (8 loc) • 594 B
TypeScript
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;