You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a use case where I would like to use F.when, but have the return type be different to the type going in to the function. At the moment the return type for F.when and F.unless can only be the input type.
The context here is creating a document in a mongodb database and first checking to see if the document already exists. If it exists (checked via MyModel.exists()), a document object is returned, if it doesnt exist, null is returned.
Hi, I have a use case where I would like to use
F.when
, but have the return type be different to the type going in to the function. At the moment the return type forF.when
andF.unless
can only be the input type.The context here is creating a document in a mongodb database and first checking to see if the document already exists. If it exists (checked via
MyModel.exists()
), a document object is returned, if it doesnt exist, null is returned.So I would like to do something like this:
The text was updated successfully, but these errors were encountered: