UNPKG

mic-inspector

Version:

A react inspector which a most similar of Chorme DevTools inspector

52 lines (51 loc) 2.21 kB
import { ReactElement } from 'react'; import { ReferenceTypes, UnknownObject } from 'mic-global'; import { NamedDescriptor } from '../named-descriptor'; import { ObjectValueType } from './types'; export declare const Object: ObjectConstructor, Node: { new (): Node; prototype: Node; readonly ATTRIBUTE_NODE: number; readonly CDATA_SECTION_NODE: number; readonly COMMENT_NODE: number; readonly DOCUMENT_FRAGMENT_NODE: number; readonly DOCUMENT_NODE: number; readonly DOCUMENT_POSITION_CONTAINED_BY: number; readonly DOCUMENT_POSITION_CONTAINS: number; readonly DOCUMENT_POSITION_DISCONNECTED: number; readonly DOCUMENT_POSITION_FOLLOWING: number; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number; readonly DOCUMENT_POSITION_PRECEDING: number; readonly DOCUMENT_TYPE_NODE: number; readonly ELEMENT_NODE: number; readonly ENTITY_NODE: number; readonly ENTITY_REFERENCE_NODE: number; readonly NOTATION_NODE: number; readonly PROCESSING_INSTRUCTION_NODE: number; readonly TEXT_NODE: number; }; export declare const arraylikeMethodNames: (string | symbol)[]; /** * Returns a string represents object name * @param value An object * @param isNode A boolean represents whether the object is a node */ export declare const getObjectName: (value: UnknownObject, isNode: boolean) => string; /** * A method to fitler object subs * @param param0 A descriptor of the object * @param arraylike A boolean represents whether the object is an array */ export declare const objectSubsFilter: ({ get, set, nameType, valueType, value, enumerable }: NamedDescriptor, arraylike: boolean) => boolean; /** * A method to render object subs * @param object The object value * @param arraylike A boolean represents whether the object is an array * @param maxPropertyLength A number represents the length of object properties to preview */ export declare const renderObjectSubs: (object: ReferenceTypes, arraylike: boolean, maxPropertyLength?: number) => ReactElement[]; /** * Get the array info * @param value An object that maybe is an array */ export declare const useArrayInfo: (value: ObjectValueType) => [boolean, number];