1 | import { ComponentType, ReactElement, ReactNode } from 'react';
|
2 | /**
|
3 | * ---
|
4 | * category: utilities/react
|
5 | * ---
|
6 | * Check if a React component instance (React element) matches one of the
|
7 | * specified types.
|
8 | *
|
9 | * @module matchComponentTypes
|
10 | * @param {ReactElement|any} componentInstance
|
11 | * @param {Array} types an array of React components
|
12 | * @returns {Boolean} true if the component matches at least one of the types
|
13 | */
|
14 | declare function matchComponentTypes<Type extends ReactElement = ReactElement>(componentInstance: ReactNode, types?: string[] | ComponentType[] | ComponentType<any>[]): componentInstance is Type;
|
15 | export default matchComponentTypes;
|
16 | export { matchComponentTypes };
|
17 | //# sourceMappingURL=matchComponentTypes.d.ts.map |
\ | No newline at end of file |