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
According to the docs model methods are supposed to support either sync or async, but in practice when I attempted to, for example, write the generateRefreshToken in a synchronous function, typescript errors because it isn'y async. So i peaked into the interface that the source validates against, and all of the methods are written to return a promise.
Documentation stating that they can be sync (supposedly)
Version >=5.x: Callback support has been removed! Each model function supports either sync or async (Promise or async function) return values.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
According to the docs model methods are supposed to support either sync or async, but in practice when I attempted to, for example, write the
generateRefreshToken
in a synchronous function, typescript errors because it isn'y async. So i peaked into the interface that the source validates against, and all of the methods are written to return a promise.Documentation stating that they can be sync (supposedly)
Source showing it expects it to return a promise
Beta Was this translation helpful? Give feedback.
All reactions