Skip to content

Wire Assert, TextEncoder, and MessagePort transfer typing - #234

Merged
kevinresol merged 21 commits into
HaxeFoundation:masterfrom
kevinresol:chore/cross-wiring-assert-encoder-port
Jul 14, 2026
Merged

kevinresol merged 21 commits into
HaxeFoundation:masterfrom
kevinresol:chore/cross-wiring-assert-encoder-port

Conversation

@kevinresol

Copy link
Copy Markdown
Contributor

Summary

  • A6: TestContextAssert extends shared js.node.assert.AssertMethods (instance signatures matching js.node.Assert); removes implements Dynamic. Assert.strict is typed as AssertMethods.
  • A7: Align js.node.util.TextEncoder with the web encoder surface by adding encodeInto and reusing TextEncoderEncodeIntoResult.
  • A8: Introduce worker_threads.Transferable from already-externed types (ArrayBuffer, MessagePort, AbortSignal, FileHandle, web streams) and use it for MessagePort/Worker/postMessageToThread transfer lists; tighten web MessagePort transfer similarly. Posted message values remain Dynamic on purpose.

Test plan

  • haxe build.hxml succeeds
  • Spot-check t.assert.ok / t.assert.strictEqual / t.assert.snapshot typing
  • Spot-check util.TextEncoder.encodeInto and web.TextEncoder.encodeInto
  • Spot-check postMessage(..., transferList) accepts ArrayBuffer / MessagePort without inventing extra transferables

Made with Cursor

kevinresol and others added 21 commits July 14, 2026 16:00
Add missing Node 24 fs/zlib APIs (openAsBlob, mkdtempDisposable*, Zstd),
drop Haxe 3 conditionals in this section, and tighten Dynamic where possible.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop remaining Haxe 3 conditionals, prefer js.node.web.AbortSignal, and add core node:trace_events, node:sqlite, and node:sea surfaces.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add StatWatcher/Utf8Stream, Fs.promises, F_OK deprecations, glob URL cwd,
FSWatcher ref/unref, Zlib options polish, and PathModule.toNamespacedPath.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fill net/http/https/http2/tls/dgram/dns/tty API gaps against Node 24,
replace Haxe 3 conditionals with Haxe 4 types, and tighten Dynamics
where practical.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align child_process, cluster, readline, repl, vm, v8, and domain with Node 24 APIs, drop Haxe 3 conditionals, and add core async_hooks, worker_threads, and wasi stubs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop Haxe 3 conditionals across events, stream, buffer, timers, process,
module, and globals; add missing Node 24 public APIs; tighten Dynamics where
types exist; leave cross-section TODOs for web streams and IPC/loader types.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix registerStorage options shape, expose DatabaseSync open/txn/limits,
tighten Network headers typing, and clean MockTracker formatting.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop Haxe 3 conditionals, add missing Node 24 APIs (KeyObject, X509,
MIMEType, CallTracker, URLPattern, argon2/KEM, parseArgs, etc.), and
narrow avoidable Dynamic usage with remaining gaps marked TODO(section-4).

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop Haxe 3 import gates, tighten Dynamic/Any typing for fetch/abort/events,
and add missing Node 24 web-platform externs (streams, messaging, WebSocket,
EventSource, Navigator/locks, Storage, encoding globals).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Compose TestContextAssert with shared AssertMethods, align util.TextEncoder encodeInto with the web surface, and tighten worker/web transfer lists to real Transferable types.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kevinresol
kevinresol merged commit e380790 into HaxeFoundation:master Jul 14, 2026
10 checks passed
@kevinresol kevinresol mentioned this pull request Jul 14, 2026
1 of 2 tasks
@kevinresol
kevinresol deleted the chore/cross-wiring-assert-encoder-port branch July 15, 2026 01:01
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.

1 participant