import React from 'react'; import type { FieldEntity, Meta, Store, ValidateOptions, RuleObject, RuleError, InternalNamePath } from '../interface'; import type { FieldProps } from './index'; export interface FieldState { resetCount: number; } export default class FieldComponent extends React.Component { /** * Follow state should not management in State since it will async update by React. * This makes first render of form can not get correct state value. */ private touched; private validatePromise; private prevValidating; private errors; private warnings; private preserve; private mounted; private name; private prefixName; /** @private Pass context as prop instead of context api * since class component can not get context in constructor */ reRender: () => void; refresh: () => void; triggerMetaEvent: (destroy?: boolean) => void; setNamePath(name: any, fieldContext: any): InternalNamePath; getNamePath(): InternalNamePath; getRules: () => RuleObject[]; onStoreChange: FieldEntity['onStoreChange']; validateRules: (options?: ValidateOptions) => Promise; isFieldValidating: () => boolean; isFieldTouched: () => boolean; getErrors: () => string[]; getWarnings: () => string[]; isListField: () => boolean; isList: () => boolean; isPreserve: () => boolean; getMeta: () => Meta; getValue: (store?: Store) => any; }