From 6891e5ac57660966085a6581726252d29557d613 Mon Sep 17 00:00:00 2001 From: Lann Martin Date: Mon, 10 Aug 2026 20:02:25 -0400 Subject: [PATCH] wasi-shims: explicit type on the poll export (JSR no-slow-types) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A5's suspending()-wrapped poll export left its public type inferred, which JSR's no-slow-types check rejects — the 0a55393 release run's 'publish unstable prereleases to JSR' step failed on exactly this (core and browser lanes green; the GitHub release cut fine, so only the JSR versions are missing for that commit). deno publish --dry-run passes in wasi-shims/ with the annotation; just test-wasi-shims 46/46. --- wasi-shims/src/io.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wasi-shims/src/io.ts b/wasi-shims/src/io.ts index 07e67c0..6965010 100644 --- a/wasi-shims/src/io.ts +++ b/wasi-shims/src/io.ts @@ -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 = suspending( (pollables: readonly Pollable[]): number[] | Promise => { // io.wit: "poll [...] traps if the list [...] is empty". An unbranded // host throw is the embedder contract's spelling of a trap.