Replies: 1 comment
-
@z1haze thanks for reporting this. I think the docs are just confusing here. The lib treats every model function as async, which in turn of course allows to also pass sync methods, as they are resolved within an async context and are thus non-blocking. I created a PR as initial input for further discussion: #347 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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