/** * Default mapping from IR `type.name` strings to Mongoose schema type strings. * * This table is the projection's sole interpreter of Manifest's open type * vocabulary for Mongoose. The projection knows what any given IR type name * means for Mongoose; nothing upstream carries Mongoose knowledge. * * Consumers can override per-property via `typeMappings`. Anything not in * this table and not overridden produces a hard diagnostic — no fallback, * no guessing. That is the contract. * * IMPORTANT: `'number'` is INTENTIONALLY ABSENT from this table. * Manifest's `number` is ambiguous between integers, real numbers, and * money. Silently mapping it to `Number` is exactly the class of silent * bug this project exists to prevent. Authors must pick a precise type: * - `int` / `bigint` for counts and ids * - `float` for measurements where rounding is acceptable * - `money` / `decimal` for currency and other exact-decimal values * Bare `number` produces a hard MONGOOSE_AMBIGUOUS_NUMBER diagnostic. */ /** * Mongoose schema type representation. * * `schemaType` is the string used in Mongoose schema definitions: * - Simple types: 'String', 'Number', 'Boolean', 'Date', 'Buffer' * - Special types: 'Schema.Types.ObjectId', 'Schema.Types.Mixed', * 'Schema.Types.Decimal128', 'Schema.Types.BigInt' */ export interface MongooseSchemaType { /** Mongoose SchemaType string (e.g. 'String', 'Number', 'Date') */ schemaType: string; } declare const DEFAULT_TYPE_MAPPING: Readonly>; export { DEFAULT_TYPE_MAPPING }; /** * Resolve a Mongoose schema type for an IR `type.name`, given optional * per-property overrides from projection config. Returns `undefined` when * the name is unknown and no override is supplied — the caller MUST emit * a diagnostic. */ export declare function resolveMongooseType(irTypeName: string, overrides: Readonly> | undefined, propertyName: string): MongooseSchemaType | undefined; //# sourceMappingURL=type-mapping.d.ts.map