Skip to content

Commit 0d2eeae

Browse files
coderabbitai[bot]snipsnipsnip
authored andcommitted
docs: Add docstrings to test-whole
Docstrings generation was requested by @snipsnipsnip. * #49 (comment)
1 parent 12b0c81 commit 0d2eeae

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/thunderbird/util/promisified_message_port.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ import type { IMessagePort } from "src/ghosttext-runner"
22
import { PromisifyingQueue } from "src/util/promisifying_queue"
33

44
/**
5-
* Create a pair of PromisifiedMessagePort from a MessageChannel.
6-
* @template TRequest The type of messages which port1 can sends, and port2 expects to receive
7-
* @template TResponse The type of messages which port1 expects to receive, and port2 can send
5+
* Creates a pair of promisified message ports from a MessageChannel.
6+
*
7+
* @template TRequest The type of messages the first returned port can send and the second expects to receive
8+
* @template TResponse The type of messages the first returned port expects to receive and the second can send
9+
* @returns A tuple `[IMessagePort<TRequest, TResponse>, IMessagePort<TResponse, TRequest>]` where the first element is a promisified port for sending `TRequest` and receiving `TResponse`, and the second element is a promisified port for sending `TResponse` and receiving `TRequest`
810
*/
911
export function promisifyMessageChannel<TRequest extends object | string, TResponse extends object | string>({
1012
port1,

0 commit comments

Comments
 (0)