Closed nicholasfoden closed 1 year ago
interface MongoMemoryServerOpts
is exported, just not in the main entry-point, you will have to use direct import if you want to use it.
instead of import { MongoMemoryServerOpts } from "mongodb-memory-server-core"
you have to import { MongoMemoryServerOpts } from "mongodb-memory-server-core/lib/MongoMemoryServer"
or you could alternatively also use Parameters<MongoMemoryServer['create']>[0]
instead of MongoMemoryServerOpts
directly
package:
What is your question?
Would it be possible to export
MongoMemoryServerOpts
andMongoMemoryReplSetOpts
type in one of the packages?Or is there a good reason why it is not exported?
Use case
Writing a factory which spins up and seeds a database with test data
Example proposed usage
Thanks for looking at this issue.