UNPKG

mongodb-schema

Version:

Infer the probabilistic schema for a MongoDB collection.

8 lines (7 loc) 413 B
/// <reference types="node" /> import { Schema as InternalSchema, SchemaType } from '../schema-analyzer'; import { MongoDBJSONSchema } from '../types'; export declare const InternalTypeToBsonTypeMap: Record<SchemaType['name'] | 'Double' | 'BSONSymbol', string>; export declare function convertInternalToMongodb(internalSchema: InternalSchema, options?: { signal?: AbortSignal; }): Promise<MongoDBJSONSchema>;