@autorest/common
Version:
Autorest common utilities
25 lines • 1.25 kB
TypeScript
import { JsonPath } from "@azure-tools/datastore";
/**
* Merge a and b by adding new properties of b into a. It will fail if a and b have the same property and the value is different.
* @param a Object 1 to merge
* @param b Object 2 to merge
* @param path current path of the merge.
*/
export declare function strictMerge(a: any, b: any, path?: JsonPath): any;
/**
* Resolve the expanded value by interpolating any
* @param value Value to interpolate.
* @param propertyName Name of the property.
* @param higherPriority Higher priority context to resolve the interpolation values.
* @param lowerPriority Lower priority context to resolve the interpolation values.
* @param jsAware
*/
export declare function resolveRValue(value: any, propertyName: string, higherPriority: any, lowerPriority: any, jsAware?: number): any;
export type ArrayMergingStrategy = "high-pri-first" | "low-pri-first";
export interface MergeOptions {
interpolationContext?: any;
arrayMergeStrategy?: ArrayMergingStrategy;
concatListPathFilter?: (path: JsonPath) => boolean;
}
export declare function mergeOverwriteOrAppend(higherPriority: any, lowerPriority: any, options?: MergeOptions, path?: JsonPath): any;
//# sourceMappingURL=merging.d.ts.map