/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { type FluidLayer, type ILayerCompatDetails, type ILayerCompatSupportRequirements } from "@fluid-internal/client-utils"; import type { IErrorBase } from "@fluidframework/core-interfaces"; import type { MonitoringContext } from "./config.js"; /** * The config key to disable layer compatibility validation. * @internal */ export declare const allowIncompatibleLayersKey = "Fluid.AllowIncompatibleLayers"; /** * Validates the compatibility between two layers using their compatibility details and support requirements. * If the layers are incompatible, it logs a "LayerIncompatibilityError" error event. It will also call the dispose * function with the error and throw the error. * @param layer1 - The name of the first layer. * @param layer2 - The name of the second layer. * @param compatDetailsLayer1 - The compatibility details of the first layer. * @param compatSupportRequirementsLayer1 - The support requirements that the second layer must meet to be compatible * with the first layer. * @param maybeCompatDetailsLayer2 - The compatibility details of the second layer. This can be undefined if the * second layer does not provide compatibility details. * @param disposeFn - A function that will be called with the error if the layers are incompatible. * @param mc - The monitoring context for logging and reading configuration. * @param strictCompatibilityCheck - If true, the function will use default compatibility details for the second layer if * they are missing and use it for validation. * If false, it will skip the compatibility check if the details are missing and just log an error. * Defaults to false. * * @internal */ export declare function validateLayerCompatibility(layer1: FluidLayer, layer2: FluidLayer, compatDetailsLayer1: Pick, compatSupportRequirementsLayer1: ILayerCompatSupportRequirements, maybeCompatDetailsLayer2: ILayerCompatDetails | undefined, disposeFn: (error?: IErrorBase) => void, mc: MonitoringContext, strictCompatibilityCheck?: boolean): void; //# sourceMappingURL=layerCompatError.d.ts.map