@talend/react-forms
Version:
React forms library based on json schema form.
29 lines (28 loc) • 1.2 kB
TypeScript
/**
* Get a value stored in properties, identified by key
* @param {object} properties The properties store
* @param {object} schema The schema containing the key chain (array of strings)
* to access to the value
*/
export function getValue(properties: object, schema: object): any;
/**
* Convert a string value to the wanted type
* @param type The string type
* @param value The value to convert
*/
export function convertValue(type: any, value: any): any;
/**
* Mutate the properties, setting the value in the input identified by schema
* @param {object | array} properties The original properties store
* @param {object} schema The input schema
* @param {any} value The value to set
* @returns {object} The new mutated properties.
*/
export function mutateValue(properties: object | array, schema: object, value: any): object;
/**
* Extract all the data-* attributes from the given props.
* @param {object} props Some properties
* @param {int} index An index if the data-* properties need to be suffixed with an index.
* @return {object} Only the data-* properties with '.index' suffix if available.
*/
export function extractDataAttributes(props: object, index: int): object;