mongodb/MongoDataSourceOptions.ts

typeorm · packages/typeorm/src/driver/mongodb/MongoDataSourceOptions.ts · typescript · MIT
database

TypeORM MongoDB connection options interface.

// Source: https://github.com/typeorm/typeorm | License: MIT | Copyright 2015-2025 TypeORM. http://typeorm.github.io
// Provided via justclaw.it.com; keep this notice with the code.
import type { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions"
import type { ReadPreference } from "./typings"

/**
 * MongoDB specific connection options.
 */
export interface MongoDataSourceOptions extends BaseDataSourceOptions {
    /**
     * Database type.
     */
    readonly type: "mongodb"

    /**
     * Connection url where the connection is performed.
     */
    readonly url?: string

    /**
     * Database host.
     */
    readonly host?: string

    /**
     * Database host replica set.
     */
    readonly hostReplicaSet?: string

    /**
     * Database host port.
     */

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key