Skip to content

Commit 5a25d42

Browse files
authored
Fix asyncify mistake in docs (#26627)
There's two methods with the same name - `fetch_v2`, I think the first one was supposed to be called `fetch_v1`. Edit: I also have fixed a spelling mistake in the word `included`.
1 parent a7804ea commit 5a25d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/source/docs/porting/asyncify.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Marking JS library functions as async
168168

169169
If you mark a JS library function as async using the ``__async`` decorator then
170170
the compiler will take a care of all the details of using the ``Asyncify`` API
171-
for you. The function will also automatically be incldued in
171+
for you. The function will also automatically be included in
172172
:ref:`ASYNCIFY_IMPORTS`. All you need to do is write normal async JS function
173173
(either using the explict ``async`` JS keyword or returning a ``Promise``
174174
object). For example:
@@ -177,7 +177,7 @@ object). For example:
177177
178178
addToLibrary({
179179
fetch_v1__async: 'auto',
180-
fetch_v2: async (url) => {
180+
fetch_v1: async (url) => {
181181
const response = await fetch(UTF8ToString(url);
182182
const json_data = await response.json();
183183
return stringToNewUTF8(json_data);

0 commit comments

Comments
 (0)