/** * `` — is `foo` a parameter this pack accepts? * * A generator pack's parameters are the names of the ``s in its body: * passing `tax_office="7712"` replaces the sequence called `tax_office` for * that run. Anything else was accepted in silence and did nothing. * * That silence is how a whole class of rot went unnoticed. `country="GB"` on * `common.phone.e164` returns the same Brazilian number as `country="US"`, as * `country="RU"`, and as no attribute at all — the pack is one regex * alternation with no `country` sequence in it. The same is true of `length=` * on `common.id.nanoid`, `algorithm=` on `security.jwt`, `format=` on * `brazil.tax.cpf` and a dozen more: paths that became static packs, with the * parameters that used to shape them left behind in the documentation. * * A user who writes one of those reads the docs, gets no error, and receives * data they believe they configured. Saying so out loud is the whole fix. */ import { type Diagnostic } from '../errors/index.js'; import type { AttrContext } from '../generated/TDCParser.js'; export type PackParams = ReadonlyMap>; /** Address → parameter → the width the pack's own sequence always produces. */ export type PackParamWidths = ReadonlyMap>; /** The two lookups these checks read, plus the locale that resolves the address. */ export interface PackParamCtx { readonly locale: string; readonly packParams: PackParams | undefined; readonly packParamWidths: PackParamWidths | undefined; } /** * Report attributes on a template `` that the target pack cannot act on. * * Silent when the pack is unknown to this run (a locale-resolved shape, or no * registry supplied): guessing there would produce exactly the false errors * this check must not create. */ export declare function checkTemplateParams(attrs: readonly AttrContext[], attrMap: Readonly>, path: string, ctx: PackParamCtx, diagnostics: Diagnostic[]): void; //# sourceMappingURL=pack-params.d.ts.map