/** * Validator for Handlebars for Marketing Cloud Next (MCN). * * Runs only when a document targets Marketing Cloud Next (`targetPlatform: * 'next'`). It is mutually exclusive with the GTL validator, which runs only * for Engagement. Diagnostics emitted here: * * - `handlebars/syntax-error` (Error) malformed Handlebars syntax * - `handlebars/unsupported-construct` (Error) partials, decorators, log, … * - `handlebars/unknown-helper` (Warning) helper not in the MCN catalog * - `handlebars/unknown-binding` (Warning) unknown `{!$...}` data binding * * The MCN templating engine is based on Handlebars.Net and is locked down: you * cannot register helpers, partials, or decorators. Anything outside the fixed * catalog is therefore flagged. */ import type { Diagnostic } from '../types.js'; export declare const DIAG_CODE_HBS_SYNTAX = "handlebars/syntax-error"; export declare const DIAG_CODE_HBS_UNSUPPORTED_CONSTRUCT = "handlebars/unsupported-construct"; export declare const DIAG_CODE_HBS_UNKNOWN_HELPER = "handlebars/unknown-helper"; export declare const DIAG_CODE_HBS_UNKNOWN_BINDING = "handlebars/unknown-binding"; /** Payload attached to unknown-helper / unknown-binding diagnostics for quick fixes. */ export interface HandlebarsSuggestionData { /** The unknown name the user typed (helper name or binding token). */ typed: string; /** The closest known name to suggest as a replacement. */ suggestion: string; } /** * MCN Handlebars diagnostic codes that duplicate eslint-plugin-sfmc (`-next` * config) rules and can be suppressed via `disableLspDiagnosticsForEslintRules`: * - unsupported-construct → `hbs-no-unsupported-construct` * - unknown-helper → `hbs-no-unknown-helper` * - unknown-binding → `hbs-no-unknown-binding` * * `handlebars/syntax-error` is deliberately excluded: it is a parser-level error * with no eslint-plugin-sfmc equivalent, so it must always surface. */ export declare const HBS_ESLINT_DUPLICATE_DIAG_CODES: Set; /** * Validate Handlebars for Marketing Cloud Next within a (possibly mixed) * document. AMPscript regions are blanked before parsing so the Handlebars * parser does not choke on `%%[...]%%` / `%%=...=%%` syntax. Diagnostics are * pushed in place, honoring the shared problem budget. * @param text - Full document text. * @param diagnostics - Diagnostics sink (shared across validators). * @param remainingBudget - Maximum number of additional problems to report. */ export declare function validateMcnHandlebars(text: string, diagnostics: Diagnostic[], remainingBudget: number): void; //# sourceMappingURL=mcnHandlebars.d.ts.map