/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { DefinitionError } from "../common/index.js"; import { Model } from "../models/index.js"; /** * Ensures that a model's definition is correct, and reports each error in the {@link ValidateModel.Result} it * returns, together with any errors recorded on the model beforehand. Validating a model again reports its errors * again; nothing of a run is kept on the model. * * Modifies the model as a side effect: a default value is cast to the type that carries it, and a type whose case does * not match its definition is corrected. * * A final model is frozen, so validating one reports without normalizing it: a default remains as stated, and a type * whose case does not match is reported as having no type rather than corrected. * * Note that we run validation against model classes rather than element * datatypes. The classes implement type resolution, error handling and other * logic we rely on for validation. */ export declare function ValidateModel(model: Model): ValidateModel.Result; export declare namespace ValidateModel { class Result { model: Model; elementCount: number; invalidElementCount: number; errorCounts: { [name: string]: number; }; errors: DefinitionError[]; get invalidElementPercent(): string; constructor(model: Model); report(): void; } } //# sourceMappingURL=ValidateModel.d.ts.map