Repository navigation
Write the rest of the runtime outside the widget port in TypeScript - #7433
Merged
Merged
Conversation
Converts dom, readings, records, features, host and annotations, and the top-level runtime modules (age, bootstrap, check-api, prepaint, stage-integration, validation, widget-api), to TypeScript beside the JavaScript the layer serves. The modules the Effect UI port holds stay JavaScript: dom/box-motion, dom/css-anchors and annotations/annotation-overlay. - A class declares each field it assigns, as `declare x: T`, with the type TypeScript inferred from the JavaScript, so the served code is the same. - Each compiled module parses to the program it replaces, except two: records/thread/address.js's `claim` is an arrow, which carries the type a JSDoc @type gave the function, and host/state-application.js copies a map on a reading's first write to it through one helper. - A type is exported only where another module imports it, in this batch and in the modules converted before it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V22NWabEKzt7s5HiW4koa7
leaf-agent
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Maximilian · project thread
Converts the rest of the runtime that the Effect UI port doesn't hold to TypeScript, following #7429:
These stay JavaScript:
dom/box-motion,dom/css-anchors,annotations/annotation-overlay/,effect-widget,widget-servicesandportable-apiannotations/preview.js, until the port's Port lf-options to Effect UI as the first decorating widget #7417 landsWhat runs doesn't change. With comments ignored, each compiled
.jsparses to the same program as the JavaScript it replaces on main, apart from two modules:records/thread/address.js:claimis now an arrow, which carries the type a JSDoc@typegave the function. Nothing calls it before its definition.host/state-application.js: the copy-on-write of the authored and descriptor maps goes through onewritablehelper. It copies on a reading's first write to a map, as before.Other changes:
declare x: T, with the type TypeScript inferred from the JavaScript. The strip erases these declarations..tsfiles carry Keep the options a user chose in a select across reloads and revisions #7426's changes tobootstrap,prepaint,records/carryandhost/application, merged in at the TypeScript level.Checks run:
tscoverbrowser/types/tsconfig.jsonand both Worker projectscheck:browser,test:runtime(1199 pass),test:browser,test:workertests/model: all pass except the bound-file permission test, which fails when the suite runs as rootAn independent review of the conversion found no behaviour change, and its type-level and doc-comment findings are fixed here.
Generated by Claude Code