import { MapDiff, ListDiff, ScalarDiff } from '@aws-cdk/service-spec-types'; export declare function diffByKey(a: A[], b: A[], keyFn: (x: A) => string, updatedDiff: (a: A, b: A) => B | undefined): MapDiff; export declare function diffMap(a: Record, b: Record, updatedDiff: (a: A, b: A) => B | undefined): MapDiff; /** * Diff a list by quadratically comparing all elements */ export declare function diffList(as: A[], bs: A[], eq: Eq, updatedDiff: (a: A, b: A) => B | undefined): ListDiff; export declare function diffList(as: A[], bs: A[], eq: Eq): ListDiff; export declare function tripleEq(a: A, b: A): boolean; export declare function jsonEq(a: A, b: A): boolean; export declare function diffScalar(a: A, b: A, k: K, defaultValue?: A[K]): A[K] extends string | number | boolean | undefined ? ScalarDiff> | undefined : void; export declare function diffField(a: A, b: A, k: K, eq: Eq, defaultValue?: A[K]): ScalarDiff> | undefined; /** * Return the object if it has any defined fields, otherwise undefined */ export declare function collapseUndefined(x: A): A | undefined; export declare function collapseEmptyDiff | MapDiff>(x: A): A | undefined; export type Eq = (x: A, y: A) => boolean; export type AllFieldsGiven = { [k in keyof Required]: A[k]; };