UNPKG

ts-to-mongo-schema

Version:

Using the Typescript Compiler API, this program parses through Typescript, to generate a JSON Schema that conforms to MongoDB's bson format. Useful when generating large schemas, and being unable to use a javascript or typescript library like Moongoose.

10 lines (9 loc) 309 B
import { ExtractProps } from "../extractProperties"; declare function mergeProps({ node, imports, ids, paths, props, resolveCustomGenerics, extension, }: ExtractProps): { bsonType: string; properties: { [key: string]: any; }; required: string[]; }; export default mergeProps;