import { InferredTypeMap } from './types'; /** * Guesses an element based on an array of values * * @example * inferElementFromValues( * 'address', * ['2 Baker Street', '1 Downing street'], * { number: NumberField, string: StringField } * ); * // new InferredElement() * * Types are optional: if a type isn't provided, the function falls back * to the neareast type. * * @example * inferElementFromValues( * 'content', * ['

Hello

'], * { string: StringField } // no richText type * ); * // new InferredElement() * * Types can be disabled by passing a falsy value. * * @example * inferElementFromValues( * 'content', * ['

Hello

'], * { string: StringField, richText: false } * ); * // null * * @param {String} name Property name, e.g. 'date_of_birth' * @param {[mixed]} values an array of values from which to determine the type, e.g. [12, 34.4, 43] * @param {Object} types A set of components indexed by type. The string type is the only required one * * @return InferredElement */ declare const inferElementFromValues: (name: any, values?: any[], types?: InferredTypeMap) => any; export default inferElementFromValues;