Skip to content

Commit a9c5aab

Browse files
unscriptablebriancavalier
authored andcommitted
Add a note to coroutine about when generators are detected. (#170)
Not sure if this is useful or not. Let me know if you'd like me to reword it or put it elsewhere in the docs.
1 parent 47a5173 commit a9c5aab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ getUserProfile(123)
288288
.then(profile => console.log(profile))
289289
```
290290

291+
Note: In current implementations of JavaScript, it's not possible to detect with reasonable certainty if the function passed to `coroutine` is a generator function or not. Creed can't know until the function is executed, causing creed to throw an exception synchronously at run-time.
292+
291293
### fromNode :: NodeApi e a → (...* → Promise e a)
292294
type NodeApi e a = ...* &rarr; Nodeback e a &rarr; ()<br/>
293295
type Nodeback e a = e &rarr; a &rarr; ()

0 commit comments

Comments
 (0)