Skip to content

Commit 925533c

Browse files
committed
Move withTimeout JSDoc to directly above the function
The JSDoc was stranded above ENTITY_MAP after the HTML helpers were inserted, causing tooling to misattribute it.
1 parent ba39bc3 commit 925533c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/util.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
/**
2-
* Race a promise against a timeout. Returns the promise result or undefined on timeout.
3-
*
4-
* Note: this only stops *awaiting* the promise — it does not cancel the underlying
5-
* operation (e.g. a CLI child process). Node will keep the process alive until
6-
* the child exits. This is acceptable for shutdown: the OS will reap orphaned
7-
* CLI processes, and a stuck child is better than blocking shutdown indefinitely.
8-
*/
91
// ---------------------------------------------------------------------------
102
// HTML helpers — shared by mentions/parse.ts and outbound/format.ts
113
// ---------------------------------------------------------------------------
@@ -35,6 +27,14 @@ export function stripTags(text: string): string {
3527
return text;
3628
}
3729

30+
/**
31+
* Race a promise against a timeout. Returns the promise result or undefined on timeout.
32+
*
33+
* Note: this only stops *awaiting* the promise — it does not cancel the underlying
34+
* operation (e.g. a CLI child process). Node will keep the process alive until
35+
* the child exits. This is acceptable for shutdown: the OS will reap orphaned
36+
* CLI processes, and a stuck child is better than blocking shutdown indefinitely.
37+
*/
3838
export async function withTimeout<T>(
3939
promise: Promise<T>,
4040
ms: number,

0 commit comments

Comments
 (0)