@zendesk/react-measure-timing-hooks
Version:
react hooks for measuring time to interactive and time to render of components
12 lines (11 loc) • 606 B
TypeScript
import type { MapSchemaToTypes, RelationSchemaValue } from './types';
/**
* Validates and coerces a relatedTo object against a schema
* @param relatedTo The relatedTo object to validate and coerce
* @param schema The schema to validate against
* @returns An object containing the coerced relatedTo and any validation errors
*/
export declare function validateAndCoerceRelatedToAgainstSchema<RelationSchemaT extends Record<string, RelationSchemaValue>>(relatedTo: MapSchemaToTypes<RelationSchemaT>, schema: RelationSchemaT): {
relatedTo: MapSchemaToTypes<RelationSchemaT>;
errors: string[];
};