Skip to content

Commit 0729947

Browse files
authored
Fix a typo in the README (#11)
1 parent 00db35d commit 0729947

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.3
2+
3+
* No user-visible changes.
4+
15
## 1.1.2
26

37
* No user-visible changes.

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,32 @@ action.
1212

1313
[the `sync-child-process` package]: https://github.com/sass/sync-child-process
1414

15+
[**API Docs**]
16+
17+
[**API Docs**]: https://sass.github.io/sync-message-port/classes/SyncMessagePort.html
18+
1519
## Usage
1620

17-
1. Use `SyncMessagePort.createChanenl()` to create a message channel that's set
18-
up to be compatible with `SyncMessagePort`s. A normal `MessageChannel` won't
19-
work!
21+
1. Use [`SyncMessagePort.createChannel()`] to create a message channel that's
22+
set up to be compatible with `SyncMessagePort`s. A normal `MessageChannel`
23+
won't work!
2024

2125
2. You can send this `MessageChannel`'s ports across worker boundaries just like
2226
any other `MessagePort`. Send one to the worker you want to communicate with
2327
synchronously.
2428

2529
3. Once you're ready to start sending and receiving messages, wrap *both* ports
26-
in `new SyncMessagePort()`, even if one is only ever going to be sending
30+
in [`new SyncMessagePort()`], even if one is only ever going to be sending
2731
messages and not receiving them.
2832

29-
4. Use `SyncMessagePort.postMessage()` to send messages and
33+
4. Use [`SyncMessagePort.postMessage()`] to send messages and
3034
`SyncMessagePort.receiveMessage()` to receive them synchronously.
3135

36+
[`SyncMessagePort.createChannel()`]: https://sass.github.io/sync-message-port/classes/SyncMessagePort.html#createChannel
37+
[`new SyncMessagePort()`]: https://sass.github.io/sync-message-port/classes/SyncMessagePort.html#constructor
38+
[`SyncMessagePort.postMessage()`]: https://sass.github.io/sync-message-port/classes/SyncMessagePort.html#postMessage
39+
[`SyncMessagePort.receiveMessage()`]: https://sass.github.io/sync-message-port/classes/SyncMessagePort.html#receiveMessage
40+
3241
```js
3342
import {Worker} from 'node:worker_threads';
3443
import {SyncMessagePort} from 'sync-message-port;
@@ -111,7 +120,7 @@ across threads when messages are available, and
111120

112121
[`Atomics`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics
113122
[`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
114-
[`Worker.receiveMessageOnPort()`]: https://nodejs.org/api/worker_threads.html#workerreceivemessageonportport
123+
[`worker_threads.receiveMessageOnPort()`]: https://nodejs.org/api/worker_threads.html#workerreceivemessageonportport
115124

116125
### Can I use this in a browser?
117126

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sync-message-port",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "A Node.js communication port that can pass messages synchronously between workers",
55
"repository": "sass/sync-message-port",
66
"author": "Google Inc.",

0 commit comments

Comments
 (0)