import { MatterTransformErrorCodes } from "./constants"; type MatterTransformErrorCode = (typeof MatterTransformErrorCodes)[keyof typeof MatterTransformErrorCodes]; type FailSafeBuildContext = Record; type TransformErrorLogContext = FailSafeBuildContext & { reason?: string; }; /** * Soft-logs a Matter transform failure with a stable error code, message, and * structured context. Centralizes warn output so log shape can evolve in one place. */ declare function logTransformError(code: MatterTransformErrorCode, context?: TransformErrorLogContext): void; /** * Runs a build step and absorbs failures at this level only — logs the error * and returns `undefined` so sibling and parent builds can continue. */ declare function failSafeBuild(code: MatterTransformErrorCode, context: FailSafeBuildContext, fn: () => T): T | undefined; /** * Maps items while absorbing per-item build failures. * Items that return `undefined` (or throw) are omitted from the result. */ declare function failSafeBuildAll(code: MatterTransformErrorCode, items: readonly T[], fn: (item: T, index: number) => R | undefined, contextForItem?: (item: T, index: number) => FailSafeBuildContext): R[]; export { failSafeBuild, failSafeBuildAll, logTransformError }; export type { MatterTransformErrorCode, FailSafeBuildContext, TransformErrorLogContext, };