import type { ComparatorResolver } from './compare.ts'; /** * Returns a deeply key-sorted copy of a value parsed from JSON. * * - Objects: keys are reordered with the comparator `resolveComparator` returns * for the object's `path`, and their values are sorted recursively. * - Arrays: element order is preserved (it is meaningful in CloudFormation) but * each element is still recursed into so objects nested in arrays get sorted. * Array indices are not part of the path — an array is transparent to it. * The only exceptions are position-scoped: a resource's `Properties.Tags` * array (reordered by `Key`) and a resource's `DependsOn` array of strings * (sorted alphabetically). * - Everything else (strings, numbers, booleans, null) is returned unchanged. * * `path` is the sequence of object keys traversed from the root to the current * value. It is the context `resolveComparator` uses to apply position-aware * rules (root section order, per-resource attribute order) while everything else * stays alphabetical. The default resolver sorts every level alphabetically. */ export declare function sortValue(value: unknown, resolveComparator?: ComparatorResolver, path?: readonly string[]): unknown;