Skip to content

Commit

Permalink
refactor(MongoMemoryReplSet): remove "?" from "MongoMemoryReplSetOptsT"
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Oct 12, 2020
1 parent 90ed578 commit 138e21d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/mongodb-memory-server-core/src/MongoMemoryReplSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export interface MongoMemoryReplSetConfigSettingsT {
* Options for the replSet
*/
export interface MongoMemoryReplSetOptsT {
instanceOpts?: MongoMemoryInstancePropBaseT[];
binary?: MongoBinaryOpts;
replSet?: ReplSetOpts;
instanceOpts: MongoMemoryInstancePropBaseT[];
binary: MongoBinaryOpts;
replSet: ReplSetOpts;
}

/**
Expand Down Expand Up @@ -120,7 +120,7 @@ export class MongoMemoryReplSet extends EventEmitter {

_state: MongoMemoryReplSetStateEnum = MongoMemoryReplSetStateEnum.stopped;

constructor(opts: MongoMemoryReplSetOptsT = {}) {
constructor(opts: Partial<MongoMemoryReplSetOptsT> = {}) {
super();
const replSetDefaults: Required<ReplSetOpts> = {
auth: false,
Expand Down Expand Up @@ -165,7 +165,7 @@ export class MongoMemoryReplSet extends EventEmitter {
* Create an instance of "MongoMemoryReplSet" and call start
* @param opts Options for the ReplSet
*/
static async create(opts: MongoMemoryReplSetOptsT = {}): Promise<MongoMemoryReplSet> {
static async create(opts: Partial<MongoMemoryReplSetOptsT> = {}): Promise<MongoMemoryReplSet> {
const replSet = new this({ ...opts });
await replSet.start();
return replSet;
Expand Down

0 comments on commit 138e21d

Please sign in to comment.