import { Program } from "@typespec/compiler"; /** * @flatBag("X") on a model must name a property X that actually exists on the model. */ export declare function validateFlatBagDiscriminatorMustExist(program: Program): void; /** * The @flatBag discriminator property must be typed as a named enum (optionally nullable). * String / number / boolean discriminators defeat the pattern's structural validation, * since variant-name resolution depends on having an enum member set to match against. */ export declare function validateFlatBagDiscriminatorMustBeEnum(program: Program): void; /** * @variant() with zero arguments is meaningless: absence of @variant already means * "meaningful for every variant", and presence with values means "meaningful only for * these values". An empty `@variant()` is neither — flag it as a coding error. */ export declare function validateVariantValuesMustNotBeEmpty(program: Program): void; /** * @variant only makes sense on a property whose parent model is @flatBag and that is NOT * the discriminator itself. @variant scopes a sibling property to specific discriminator * values; applying it to the discriminator is meaningless (the discriminator IS the * variant signal, not a variant-conditional property). */ export declare function validateVariantTargetMustBeFlatBagSibling(program: Program): void; /** * Each value passed to @variant("a", "b") must name an actual member of the discriminator * enum on the parent flat-bag model. Catches typos and stale variant names after enum * members are renamed. */ export declare function validateVariantValuesMustBeEnumMembers(program: Program): void; /** * Lint rule: sibling properties on a @flatBag model should be nullable so payloads can * omit them when their variant is not selected. The discriminator itself, and properties * meaningful for every variant (no @variant), are exempt. * * Phase 3 default: off in the recommended ruleset until we have telemetry on false-positive * rate — Phase 1 found many real flat-bags with deliberately non-null primitive siblings * (e.g. recurrencePattern.interval). */ export declare const flatBagSiblingsShouldBeNullable: import("@typespec/compiler").LinterRuleDefinition<"flat-bag-siblings-should-be-nullable", { readonly default: import("@typespec/compiler").CallableMessage<["property", "model", "variants"]>; }, Record>; /** * Lint rule: the discriminator enum on a @flatBag model should be closed-set (no * `unknownFutureValue` member). Flat-bag semantics depend on a known fixed variant set; * an `unknownFutureValue` makes the variant→property mapping unverifiable for that value. */ export declare const flatBagEnumShouldBeClosed: import("@typespec/compiler").LinterRuleDefinition<"flat-bag-enum-should-be-closed", { readonly default: import("@typespec/compiler").CallableMessage<["enum", "model"]>; }, Record>; //# sourceMappingURL=flat-bag.d.ts.map