Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion wasi-shims/src/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ export class Pollable {
* `wasi:io/poll.poll` — indices of the ready pollables, parking the
* calling frame until at least one is ready. Sync fast path: if anything
* is ready right now, the indices return without a suspension.
*
* The explicit annotation is JSR's no-slow-types rule (the `suspending`
* wrapper would otherwise leave this public symbol's type inferred).
*/
export const poll = suspending(
export const poll: (pollables: readonly Pollable[]) => number[] | Promise<number[]> = suspending(
(pollables: readonly Pollable[]): number[] | Promise<number[]> => {
// io.wit: "poll [...] traps if the list [...] is empty". An unbranded
// host throw is the embedder contract's spelling of a trap.
Expand Down
Loading