Skip to content

mods/diff: type openPane's answer as unknown so a richer $.ui.open result compiles - #95198

Merged
poteat merged 1 commit into
mainfrom
poteat/diff-openpane-unknown
Sep 18, 2026
Merged

poteat merged 1 commit into
mainfrom
poteat/diff-openpane-unknown

Conversation

@poteat

@poteat poteat commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The diff mod's host contract declared openPane as returning Promise<void>. $.ui.open is about to resolve with a small result object, so the declared type becomes Promise<unknown>, which compiles against both the current and the next engine typings. No caller reads the value; behaviour is unchanged.

@konsta95 konsta95 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally at 38f6d7c against base 68ac8bb:

  • tsc -p mods/tsconfig.json (5.9.3) passes on base and head.
  • With $.ui.open retyped to resolve an object, base fails at
    register.ts:609 and head compiles.
  • All three openPane call sites discard the value.
  • Emitted JS for host.ts and register.ts is byte-identical.
  • diff mod tests: 142/142 on base and head, on 2.1.274 and 2.1.276.

On 2.1.276 $.ui.open still resolves undefined under
plugin test, so this lands ahead of the engine change.

@poteat
poteat merged commit 6ce37e9 into main Sep 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants