import { ChangeLookup } from './changelookup'; declare namespace properties { /** * Validates if an object (POJO/JSON) adheres to a specific structure using a JSON schema. * @param instance - Object to validate. * @param schema - JSON schema used for validation. * @param references - Schema references for types etc. * @returns - True iff the provided instance in valid according to the schema. */ function validate(instance: any, schema: object, references?: Array<[object, string]>): boolean; /** * Complements default values for all (nested) properties and array's of objects of a given object (POJO/JSON). * ``` * const schema: any = { type: 'object', properties: { * foo: { type: 'object', properties: { * bar: { type: 'string', default: 'moep' }, * baz: { type: 'string' } } } } }; * * const object: any = { }; * JsonSchema.complement(object, schema); * console.log(object.foo.bar); // should exist and output 'moep' * ``` * * @param instance - Object to complement default values for. * @param schema - Schema used for validation. */ function complement(instance: any | undefined, schema: any): void; /** * Deep comparison of two objects. It returns whether or not changes have been found (returns true) or objects * seem to be equal w.r.t. to their property structure and respective values (returns false). All changes that * are found will be passed to the alteration lookup. * @param objectL - Left operand for deep comparison. * @param objectR - Right operand for deep comparison. * @param lookup - Actual alteration lookup used for top-down property traversal. * @returns - False iff both objects are equal w.r.t. structure and values. True otherwise. */ function compare(objectL: any | undefined, objectR: any | undefined, tracker?: ChangeLookup, path?: string): boolean; } export = properties;