import type { PartitivePresence } from './partitive-presence.js'; import type { PartitiveCount } from './partitive-count.js'; export type MultiplicityName = 'compulsory' | 'optional' | 'compulsory_multiple' | 'optional_multiple' | 'compulsory_at_least_one'; export declare const MULTIPLICITY: Readonly, MultiplicityName>>; export declare const MULTIPLICITY_VALUES: ReadonlyArray; export declare const DEFAULT_MULTIPLICITY: MultiplicityName; export declare function multiplicityFromPair(presence: PartitivePresence, count: PartitiveCount): MultiplicityName; /** * Canonical error for the invalid (presence, count) combination. * Single source of truth — hyperedge-member.ts delegates to this so * the error string doesn't drift across the two files. */ export declare function invalidCombinationError(presence: unknown, count: unknown): Error; export declare function pairFromMultiplicity(name: MultiplicityName): { presence: PartitivePresence; count: PartitiveCount; }; export declare function isValidMultiplicity(name: unknown): name is MultiplicityName; interface MemberWithMultiplicity { presence?: PartitivePresence; count?: PartitiveCount; multiplicity?: string; } /** * Resolve the ISO 704 multiplicity name from any object carrying * `presence` + `count`, OR a legacy object that still has a literal * `multiplicity` field (pre-v4 JSON). * * For v4 `PartitiveMember` instances, `presence` + `count` are always * set (defaults applied at construction), so the legacy branch never * fires on a real instance — it exists purely to round-trip raw JSON * that bypassed the model constructor. * * Throws on the invalid `(optional, at_least_one)` combination — the * model already rejects this at construction, so reaching the throw * here means the caller bypassed the model. Let the error propagate * rather than silently returning 'compulsory' (which would mask the * data corruption). */ export declare function resolveMultiplicity(member: MemberWithMultiplicity | null | undefined): MultiplicityName | string; export {}; //# sourceMappingURL=multiplicity.d.ts.map