I even get the error on TS end, that userCollectionName is not part of Mongo object:
Although, the above code runs perfectly, I get that error from TS.
I think, in case you don't want to expose userCollectionName in Mongo object of @accounts/mongo, the precedence for it should be:
1.- userCollectionName in options param.
2.- collectionName in options param.
3.- userCollectionName in defaultOptions.
The property
userCollectionName
is not part of theMongo
options in the package@accounts/mongo
.I'm using:
I even get the error on TS end, that
userCollectionName
is not part ofMongo
object:Although, the above code runs perfectly, I get that error from TS.
I think, in case you don't want to expose
userCollectionName
inMongo
object of@accounts/mongo
, the precedence for it should be: 1.-userCollectionName
inoptions
param. 2.-collectionName
inoptions
param. 3.-userCollectionName
indefaultOptions
.Here's the current code: https://github.com/accounts-js/accounts/blob/ff983b8f9603f6295f2b7c9830a7926bc36e81c4/packages/database-mongo-password/src/mongo-password.ts#L81-L85
My suggestions would be something like:
Thanks in advance.