Skip to content

Commit e316186

Browse files
committed
fix mistake in promise caveats
1 parent 5096af6 commit e316186

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: docs/caveats.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ console.log("after");
226226
ECMAScript JS output:
227227

228228
```
229-
promise construct
230-
after promise
231-
done <-- note that even though resolve was called synchronously after 'construct', it is deferred until after 'done'
229+
construct
230+
after
231+
done <-- note: resolve called synchronously after 'construct' but deferred until after 'done'
232232
```
233233

234234
Due to technical constraints (TSTL does not implement [a task queue](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#control_flow_effects_of_await) because it would be environment specific), TSTL promises will simply immediately resolve or reject promises as soon as the resolve or reject function is called. This means that for the above code, TSTL will instead produce:

0 commit comments

Comments
 (0)