typenative 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/.github/workflows/ci.yml +2 -0
  2. package/CHANGELOG.md +258 -0
  3. package/CONTRIBUTION.md +1 -1
  4. package/README.md +17 -1
  5. package/bin/cli.js +26 -11
  6. package/bin/go/bridge.js +74 -14
  7. package/bin/go/convert.js +59 -1
  8. package/bin/go/metadata.js +13 -4
  9. package/bin/go/overrides.js +4 -6
  10. package/bin/go/stdlib.generated.js +2 -0
  11. package/bin/index.js +338 -47
  12. package/bin/main.js +36 -14
  13. package/bin/node/assert.js +2 -2
  14. package/bin/node/buffer.js +9 -0
  15. package/bin/node/child_process.js +51 -3
  16. package/bin/node/cluster.js +41 -3
  17. package/bin/node/core.js +1 -1
  18. package/bin/node/crypto.js +205 -4
  19. package/bin/node/dgram.js +230 -6
  20. package/bin/node/dns.js +471 -8
  21. package/bin/node/errno_tables.js +445 -0
  22. package/bin/node/events.js +1 -1
  23. package/bin/node/fs.js +22 -15
  24. package/bin/node/fs_watch.js +407 -0
  25. package/bin/node/http.js +128 -30
  26. package/bin/node/http2.js +37 -7
  27. package/bin/node/module_v8.js +142 -0
  28. package/bin/node/net.js +9 -6
  29. package/bin/node/process.js +242 -0
  30. package/bin/node/readline.js +272 -1
  31. package/bin/node/registry.js +3 -1
  32. package/bin/node/sqlite.js +60 -12
  33. package/bin/node/stream.js +145 -10
  34. package/bin/node/test.js +311 -19
  35. package/bin/node/timers.js +1 -1
  36. package/bin/node/typed_arrays.js +608 -0
  37. package/bin/node/url.js +23 -5
  38. package/bin/node/util.js +21 -1
  39. package/bin/node/util_extra.js +6 -30
  40. package/bin/node/worker_threads.js +79 -19
  41. package/bin/node/zlib.js +131 -16
  42. package/bin/transpiler.js +4729 -616
  43. package/bin/typecheck-node.js +1 -0
  44. package/bin/version.js +1 -1
  45. package/conformance.md +1030 -877
  46. package/examples/README.md +54 -0
  47. package/examples/fibonacci/README.md +89 -0
  48. package/examples/fibonacci/bench.mjs +87 -0
  49. package/examples/fibonacci/main.ts +21 -0
  50. package/examples/hello-world/README.md +62 -0
  51. package/examples/hello-world/bench.mjs +66 -0
  52. package/examples/hello-world/main.ts +7 -0
  53. package/examples/json-server/README.md +127 -0
  54. package/examples/json-server/bench.mjs +263 -0
  55. package/examples/json-server/main.ts +67 -0
  56. package/govendor/github.com/andybalholm/brotli/LICENSE +19 -0
  57. package/govendor/github.com/andybalholm/brotli/README.md +19 -0
  58. package/govendor/github.com/andybalholm/brotli/backward_references.go +185 -0
  59. package/govendor/github.com/andybalholm/brotli/backward_references_hq.go +796 -0
  60. package/govendor/github.com/andybalholm/brotli/bit_cost.go +436 -0
  61. package/govendor/github.com/andybalholm/brotli/bit_reader.go +266 -0
  62. package/govendor/github.com/andybalholm/brotli/bitwriter.go +56 -0
  63. package/govendor/github.com/andybalholm/brotli/block_splitter.go +144 -0
  64. package/govendor/github.com/andybalholm/brotli/block_splitter_command.go +434 -0
  65. package/govendor/github.com/andybalholm/brotli/block_splitter_distance.go +433 -0
  66. package/govendor/github.com/andybalholm/brotli/block_splitter_literal.go +433 -0
  67. package/govendor/github.com/andybalholm/brotli/brotli_bit_stream.go +1435 -0
  68. package/govendor/github.com/andybalholm/brotli/cluster.go +30 -0
  69. package/govendor/github.com/andybalholm/brotli/cluster_command.go +164 -0
  70. package/govendor/github.com/andybalholm/brotli/cluster_distance.go +326 -0
  71. package/govendor/github.com/andybalholm/brotli/cluster_literal.go +326 -0
  72. package/govendor/github.com/andybalholm/brotli/command.go +254 -0
  73. package/govendor/github.com/andybalholm/brotli/compress_fragment.go +834 -0
  74. package/govendor/github.com/andybalholm/brotli/compress_fragment_two_pass.go +775 -0
  75. package/govendor/github.com/andybalholm/brotli/constants.go +77 -0
  76. package/govendor/github.com/andybalholm/brotli/context.go +2176 -0
  77. package/govendor/github.com/andybalholm/brotli/decode.go +2570 -0
  78. package/govendor/github.com/andybalholm/brotli/dictionary.go +122890 -0
  79. package/govendor/github.com/andybalholm/brotli/dictionary_hash.go +32779 -0
  80. package/govendor/github.com/andybalholm/brotli/encode.go +1220 -0
  81. package/govendor/github.com/andybalholm/brotli/encoder.go +177 -0
  82. package/govendor/github.com/andybalholm/brotli/encoder_dict.go +22 -0
  83. package/govendor/github.com/andybalholm/brotli/encoder_fast.go +201 -0
  84. package/govendor/github.com/andybalholm/brotli/entropy_encode.go +592 -0
  85. package/govendor/github.com/andybalholm/brotli/entropy_encode_static.go +4399 -0
  86. package/govendor/github.com/andybalholm/brotli/fast_log.go +290 -0
  87. package/govendor/github.com/andybalholm/brotli/find_match_length.go +45 -0
  88. package/govendor/github.com/andybalholm/brotli/go.mod +3 -0
  89. package/govendor/github.com/andybalholm/brotli/h10.go +287 -0
  90. package/govendor/github.com/andybalholm/brotli/h5.go +214 -0
  91. package/govendor/github.com/andybalholm/brotli/h6.go +216 -0
  92. package/govendor/github.com/andybalholm/brotli/hash.go +342 -0
  93. package/govendor/github.com/andybalholm/brotli/hash_composite.go +93 -0
  94. package/govendor/github.com/andybalholm/brotli/hash_forgetful_chain.go +252 -0
  95. package/govendor/github.com/andybalholm/brotli/hash_longest_match_quickly.go +214 -0
  96. package/govendor/github.com/andybalholm/brotli/hash_rolling.go +168 -0
  97. package/govendor/github.com/andybalholm/brotli/histogram.go +226 -0
  98. package/govendor/github.com/andybalholm/brotli/http.go +201 -0
  99. package/govendor/github.com/andybalholm/brotli/huffman.go +653 -0
  100. package/govendor/github.com/andybalholm/brotli/literal_cost.go +182 -0
  101. package/govendor/github.com/andybalholm/brotli/matchfinder/bargain1.go +212 -0
  102. package/govendor/github.com/andybalholm/brotli/matchfinder/bargain2.go +248 -0
  103. package/govendor/github.com/andybalholm/brotli/matchfinder/bargain3.go +278 -0
  104. package/govendor/github.com/andybalholm/brotli/matchfinder/emitter.go +34 -0
  105. package/govendor/github.com/andybalholm/brotli/matchfinder/m0.go +175 -0
  106. package/govendor/github.com/andybalholm/brotli/matchfinder/m4.go +339 -0
  107. package/govendor/github.com/andybalholm/brotli/matchfinder/matchfinder.go +103 -0
  108. package/govendor/github.com/andybalholm/brotli/matchfinder/pathfinder.go +328 -0
  109. package/govendor/github.com/andybalholm/brotli/matchfinder/textencoder.go +53 -0
  110. package/govendor/github.com/andybalholm/brotli/matchfinder/trio.go +327 -0
  111. package/govendor/github.com/andybalholm/brotli/matchfinder/zdfast.go +258 -0
  112. package/govendor/github.com/andybalholm/brotli/matchfinder/zfast.go +206 -0
  113. package/govendor/github.com/andybalholm/brotli/matchfinder/zm.go +302 -0
  114. package/govendor/github.com/andybalholm/brotli/memory.go +66 -0
  115. package/govendor/github.com/andybalholm/brotli/metablock.go +574 -0
  116. package/govendor/github.com/andybalholm/brotli/metablock_command.go +165 -0
  117. package/govendor/github.com/andybalholm/brotli/metablock_distance.go +165 -0
  118. package/govendor/github.com/andybalholm/brotli/metablock_literal.go +165 -0
  119. package/govendor/github.com/andybalholm/brotli/params.go +37 -0
  120. package/govendor/github.com/andybalholm/brotli/platform.go +103 -0
  121. package/govendor/github.com/andybalholm/brotli/prefix.go +30 -0
  122. package/govendor/github.com/andybalholm/brotli/prefix_dec.go +723 -0
  123. package/govendor/github.com/andybalholm/brotli/quality.go +196 -0
  124. package/govendor/github.com/andybalholm/brotli/reader.go +127 -0
  125. package/govendor/github.com/andybalholm/brotli/ringbuffer.go +134 -0
  126. package/govendor/github.com/andybalholm/brotli/state.go +313 -0
  127. package/govendor/github.com/andybalholm/brotli/static_dict.go +662 -0
  128. package/govendor/github.com/andybalholm/brotli/static_dict_lut.go +75094 -0
  129. package/govendor/github.com/andybalholm/brotli/symbol_list.go +22 -0
  130. package/govendor/github.com/andybalholm/brotli/transform.go +641 -0
  131. package/govendor/github.com/andybalholm/brotli/utf8_util.go +70 -0
  132. package/govendor/github.com/andybalholm/brotli/util.go +7 -0
  133. package/govendor/github.com/andybalholm/brotli/write_bits.go +52 -0
  134. package/govendor/github.com/andybalholm/brotli/writer.go +162 -0
  135. package/govendor/github.com/fsnotify/fsnotify/.mailmap +2 -0
  136. package/govendor/github.com/fsnotify/fsnotify/CHANGELOG.md +651 -0
  137. package/govendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md +147 -0
  138. package/govendor/github.com/fsnotify/fsnotify/LICENSE +25 -0
  139. package/govendor/github.com/fsnotify/fsnotify/README.md +214 -0
  140. package/govendor/github.com/fsnotify/fsnotify/backend_fen.go +469 -0
  141. package/govendor/github.com/fsnotify/fsnotify/backend_inotify.go +597 -0
  142. package/govendor/github.com/fsnotify/fsnotify/backend_kqueue.go +735 -0
  143. package/govendor/github.com/fsnotify/fsnotify/backend_other.go +22 -0
  144. package/govendor/github.com/fsnotify/fsnotify/backend_windows.go +702 -0
  145. package/govendor/github.com/fsnotify/fsnotify/fsnotify.go +526 -0
  146. package/govendor/github.com/fsnotify/fsnotify/go.mod +3 -0
  147. package/govendor/github.com/fsnotify/fsnotify/internal/darwin.go +20 -0
  148. package/govendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go +15 -0
  149. package/govendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go +15 -0
  150. package/govendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go +20 -0
  151. package/govendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go +32 -0
  152. package/govendor/github.com/fsnotify/fsnotify/internal/debug_linux.go +56 -0
  153. package/govendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go +15 -0
  154. package/govendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go +16 -0
  155. package/govendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go +45 -0
  156. package/govendor/github.com/fsnotify/fsnotify/internal/debug_windows.go +40 -0
  157. package/govendor/github.com/fsnotify/fsnotify/internal/freebsd.go +20 -0
  158. package/govendor/github.com/fsnotify/fsnotify/internal/internal.go +2 -0
  159. package/govendor/github.com/fsnotify/fsnotify/internal/unix.go +20 -0
  160. package/govendor/github.com/fsnotify/fsnotify/internal/unix2.go +25 -0
  161. package/govendor/github.com/fsnotify/fsnotify/internal/windows.go +40 -0
  162. package/govendor/github.com/fsnotify/fsnotify/shared.go +64 -0
  163. package/govendor/github.com/fsnotify/fsnotify/staticcheck.conf +3 -0
  164. package/govendor/github.com/fsnotify/fsnotify/system_bsd.go +7 -0
  165. package/govendor/github.com/fsnotify/fsnotify/system_darwin.go +8 -0
  166. package/govendor/manifest.txt +3 -1
  167. package/package.json +1 -1
  168. package/types/typenative-go.d.ts +23 -0
  169. package/types/typenative-npm.d.ts +241 -5
  170. package/types/typenative.d.ts +302 -12
package/conformance.md CHANGED
@@ -4,247 +4,314 @@ Every TypeScript language feature and standard-library API TypeNative aims to
4
4
  support, split by area. Each ✅ row links to the [conformance/](conformance/)
5
5
  probe that proves it transpiles correctly (`npm run conformance`, filter with an
6
6
  optional substring: `node scripts/conformance.mjs <filter>`; `--native` runs the
7
- self-hosted binary). Each ❌ row is a known gap with no passing probe yet.
7
+ self-hosted binary).
8
+
9
+ | Status | Meaning |
10
+ | :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | ✅ | Implemented; the linked probe proves it (`—` in the Probe column: implemented, not probed yet) |
12
+ | ❌ | Not implemented yet, but feasible: a known gap |
13
+ | 🚫 | Will not be implemented: needs something a native Go binary doesn't have (a JavaScript engine, mutable prototypes, shared memory between isolates, cgo), or is deprecated upstream |
14
+
15
+ User programs are type-checked against [types/](types/) only (`lib: []`), so an API that isn't
16
+ declared there fails the type check before it reaches the transpiler. The
17
+ [roadmap](#roadmap-known-limitations) lists the structural limitations and the order in which the
18
+ ❌ rows are planned.
8
19
 
9
20
  ## Basic types
10
21
 
11
- | Feature | Status | Probe | Notes |
12
- | ---------------------------------------------- | :----: | -------------------------------------------------------------------- | ------------------------------------------------------------------------- |
13
- | `number` | ✅ | [syntax-arithmetic.ts](conformance/syntax-arithmetic.ts) | Transpiled to `float64` |
14
- | `boolean` | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | Transpiled to `bool` |
15
- | `string` | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | |
16
- | `null` | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | |
17
- | `undefined` | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | |
18
- | `any` / `unknown` | ✅ | [syntax-selfhost-context.ts](conformance/syntax-selfhost-context.ts) | Dynamic values handled at runtime (JSON-like objects, arrays, primitives) |
19
- | Nullable types (`T \| null`, `T \| undefined`) | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | Transpiled to Go pointer types |
20
- | `bigint` | ✅ | [syntax-bigint.ts](conformance/syntax-bigint.ts) | `2n` literals → `*big.Int`; `**` → `.Exp`, comparisons via `.Cmp` |
21
- | `symbol` | ✅ | [syntax-symbols.ts](conformance/syntax-symbols.ts) | `Symbol()` → unique `*TnSymbol` pointers, usable as record keys |
22
- | `object` type | ✅ | [syntax-object-type.ts](conformance/syntax-object-type.ts) | `object` → `interface{}` |
23
- | `void` / `never` | ✅ | [syntax-void-never.ts](conformance/syntax-void-never.ts) | No return value in Go |
22
+ | Feature | Status | Probe | Notes |
23
+ | ----------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
24
+ | `number` | ✅ | [syntax-arithmetic.ts](conformance/syntax-arithmetic.ts) | Transpiled to `float64` |
25
+ | `boolean` | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | Transpiled to `bool` |
26
+ | `string` | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | |
27
+ | `null` | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | |
28
+ | `undefined` | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | |
29
+ | `any` / `unknown` | ✅ | [syntax-selfhost-context.ts](conformance/syntax-selfhost-context.ts) | Dynamic values handled at runtime (JSON-like objects, arrays, primitives) |
30
+ | A variable declared `any` / `unknown` with a primitive initializer (`const x: any = '6'`) | ✅ | [semantics-any-variables.ts](conformance/semantics-any-variables.ts) | Dynamic: `-` `*` `/` use ToNumber, `==` coerces like JS, reassignment to another type works. `any + number` adds numbers (a string operand isn't concatenated), while `+` on two dynamic values decides at run time like JS ([syntax-callback-destructuring.ts](conformance/syntax-callback-destructuring.ts)); objects keep their inferred type |
31
+ | Nullable types (`T \| null`, `T \| undefined`) | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | Transpiled to Go pointer types |
32
+ | `bigint` | ✅ | [syntax-bigint.ts](conformance/syntax-bigint.ts) | `2n` literals → `*big.Int`; `**` → `.Exp`, comparisons via `.Cmp` |
33
+ | `bigint` bitwise / shift operators (`&`, `\|`, `^`, `~`, `<<`, `>>`, compound forms) | ✅ | [syntax-bigint-bitwise.ts](conformance/syntax-bigint-bitwise.ts) | `math/big`'s two's-complement `And` / `Or` / `Xor` / `Not`; shifts round toward -Infinity |
34
+ | `BigInt()`, `BigInt.asIntN` / `asUintN` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | Integers, numeric strings and booleans; a fraction throws a `RangeError`, a bad string a `SyntaxError` |
35
+ | bigint–number loose comparisons (`5n == 5`) | ❌ | — | `false` (no cross-type coercion) |
36
+ | `symbol` | ✅ | [syntax-symbols.ts](conformance/syntax-symbols.ts) | `Symbol()` → unique `*TnSymbol` pointers, usable as record keys |
37
+ | `object` type | ✅ | [syntax-object-type.ts](conformance/syntax-object-type.ts) | `object` → `interface{}` |
38
+ | `void` / `never` | ✅ | [syntax-void-never.ts](conformance/syntax-void-never.ts) | No return value in Go |
24
39
 
25
40
  ## Variables & destructuring
26
41
 
27
- | Feature | Status | Probe | Notes |
28
- | --------------------------------------- | :----: | -------------------------------------------------------------------------------- | --------------------------------------------------- |
29
- | Variable declarations (`let` / `const`) | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | |
30
- | Array destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
31
- | Object destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads; the initializer is evaluated once ([lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts)) |
32
- | Destructuring with defaults | ✅ | [syntax-destructuring-defaults.ts](conformance/syntax-destructuring-defaults.ts) | Missing elements/properties take defaults (nil- and bounds-checked) |
33
- | Destructured parameters | ✅ | [syntax-destructuring-params.ts](conformance/syntax-destructuring-params.ts) | `function f({ a, b }: T)`, `([x, y]: number[])` |
34
- | Object shorthand | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
35
- | Object spread | ✅ | [syntax-object-spread.ts](conformance/syntax-object-spread.ts) | Spread sources copied field-by-field into the new struct |
36
- | Array spread | ✅ | [syntax-array-spread.ts](conformance/syntax-array-spread.ts) | `[...arr]`, `fn(...args)` |
37
- | `delete` operator | ✅ | [syntax-delete.ts](conformance/syntax-delete.ts) | `delete o.key` on records |
38
- | Computed keys | ✅ | [syntax-computed-keys.ts](conformance/syntax-computed-keys.ts) | Computed keys become map entries; `o.name` reads lower to `.Get("name")` |
39
- | Records / dictionaries | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `Record<K, V>` and objects indexed by key → Go maps; so are literals with keys that aren't identifiers (`{ 'Content-Type': … }`, [lib-node-http-server.ts](conformance/lib-node-http-server.ts)) |
40
- | Tuples | ✅ | [syntax-tuples.ts](conformance/syntax-tuples.ts) | `[string, number]` fixed-length arrays |
41
- | Top-level / module-scope variables | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Functions see main-file top-level variables |
42
- | Numeric separators | ✅ | [syntax-numeric-separators.ts](conformance/syntax-numeric-separators.ts) | `1_000_000` |
43
- | Hex / octal / binary literals | ✅ | [syntax-numeric-literals.ts](conformance/syntax-numeric-literals.ts) | `0xFF`, `0o17`, `0b1010`, `1e3` |
44
- | `var` declarations (hoisting) | ✅ | [syntax-var.ts](conformance/syntax-var.ts) | Function- and module-level `var` |
45
- | `using` / `await using` declarations | ✅ | [syntax-using.ts](conformance/syntax-using.ts) | Disposed in reverse order when the block ends (`defer`); `[Symbol.dispose]` methods |
42
+ | Feature | Status | Probe | Notes |
43
+ | ---------------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
44
+ | Variable declarations (`let` / `const`) | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | |
45
+ | Array destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
46
+ | Object destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads; the initializer is evaluated once ([lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts)) |
47
+ | Destructuring with defaults | ✅ | [syntax-destructuring-defaults.ts](conformance/syntax-destructuring-defaults.ts) | Missing elements/properties take defaults (nil- and bounds-checked) |
48
+ | Destructured parameters | ✅ | [syntax-destructuring-params.ts](conformance/syntax-destructuring-params.ts) | `function f({ a, b }: T)`, `([x, y]: number[])` |
49
+ | Destructured callback parameters (`([k, v]) => …`, `({ a }) => …`), `[...map]`, `map.entries()`, `{ ...record, k: v }` | ✅ | [syntax-callback-destructuring.ts](conformance/syntax-callback-destructuring.ts) | Without annotations, in `map` / `filter` / `some` & co. over tuples, Map pairs and `Object.entries`; elements of mixed tuples are dynamic |
50
+ | Object shorthand | ✅ | [lib-go-container-heap.ts](conformance/lib-go-container-heap.ts) | `{ name, priority }` takes the fields from same-named variables |
51
+ | Object spread | ✅ | [syntax-object-spread.ts](conformance/syntax-object-spread.ts) | Spread sources copied field-by-field into the new struct |
52
+ | Array spread | ✅ | [syntax-array-spread.ts](conformance/syntax-array-spread.ts) | `[...arr]`, `fn(...args)` |
53
+ | `delete` operator | ✅ | [syntax-delete.ts](conformance/syntax-delete.ts) | `delete o.key` on records |
54
+ | Computed keys | ✅ | [syntax-computed-keys.ts](conformance/syntax-computed-keys.ts) | Computed keys become map entries; `o.name` reads lower to `.Get("name")` |
55
+ | Records / dictionaries | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `Record<K, V>` and objects indexed by key → Go maps; so are literals with keys that aren't identifiers (`{ 'Content-Type': … }`, [lib-node-http-server.ts](conformance/lib-node-http-server.ts)) |
56
+ | Reading a missing key of a `Record` / `Map` of primitives (`rec[k] === undefined`) | ❌ | — | Gives the value type's zero value (`""`, `0`), so the comparison is `false`; test with `k in rec` / `map.has(k)` |
57
+ | Tuples | ✅ | [syntax-tuples.ts](conformance/syntax-tuples.ts) | `[string, number]` fixed-length arrays |
58
+ | Top-level / module-scope variables | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Functions see main-file top-level variables |
59
+ | Numeric separators | ✅ | [syntax-numeric-separators.ts](conformance/syntax-numeric-separators.ts) | `1_000_000` |
60
+ | Hex / octal / binary literals | ✅ | [syntax-numeric-literals.ts](conformance/syntax-numeric-literals.ts) | `0xFF`, `0o17`, `0b1010`, `1e3` |
61
+ | `var` declarations (hoisting) | ✅ | [syntax-var.ts](conformance/syntax-var.ts) | Function- and module-level `var` |
62
+ | `using` / `await using` declarations | ✅ | [syntax-using.ts](conformance/syntax-using.ts) | Disposed in reverse order when the block ends (`defer`); `[Symbol.dispose]` methods |
63
+ | Writing past the end of an array (`arr[arr.length + 2] = x`) | ✅ | [semantics-array-growth.ts](conformance/semantics-array-growth.ts) | The array grows; holes read as the zero value (`0`, `""`), not `undefined` |
64
+ | Sparse-array holes | 🚫 | — | Slices have no holes: a hole would read as the zero value, not `undefined` |
46
65
 
47
66
  ## Operators
48
67
 
49
- | Feature | Status | Probe | Notes |
50
- | ---------------------------- | :----: | ---------------------------------------------------------------------------- | --------------------------------------------------- |
51
- | Arithmetic operators | ✅ | [syntax-arithmetic.ts](conformance/syntax-arithmetic.ts) | `+`, `-`, etc.; `%`/`%=` via `math.Mod` |
52
- | Exponent operator | ✅ | [syntax-exponent.ts](conformance/syntax-exponent.ts) | `2 ** 10` |
53
- | Bitwise operators | ✅ | [syntax-bitwise.ts](conformance/syntax-bitwise.ts) | `&`, `\|`, `^`, `<<`, `>>` |
54
- | Unsigned shift | ✅ | [syntax-unsigned-shift.ts](conformance/syntax-unsigned-shift.ts) | `>>>` |
55
- | Comparison operators | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | `==`, `!=`, `===`, `!==`, etc. |
56
- | Logical operators | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | `&&`, `\|\|` |
57
- | Increment / decrement | ✅ | [syntax-increment-expression.ts](conformance/syntax-increment-expression.ts) | `++`, `--`, incl. as expressions |
58
- | Non-null assertion (`!`) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Stripped during transpilation |
59
- | Ternary expressions | ✅ | [syntax-ternary.ts](conformance/syntax-ternary.ts) | `condition ? a : b` |
60
- | Nullish coalescing | ✅ | [syntax-nullish.ts](conformance/syntax-nullish.ts) | `??` operator, incl. chains |
61
- | Optional chaining | ✅ | [syntax-optional-chaining.ts](conformance/syntax-optional-chaining.ts) | `obj?.prop`, `arr?.[i]`, chains across calls |
62
- | Nullish / logical assignment | ✅ | [syntax-logical-assignment.ts](conformance/syntax-logical-assignment.ts) | `??=`, `\|\|=`, `&&=` |
63
- | `in` operator | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `"key" in obj` on records |
64
- | `typeof` | ✅ | [syntax-typeof.ts](conformance/syntax-typeof.ts) | `"key" in obj`, `typeof x === "string"` |
65
- | `instanceof` | ✅ | [syntax-instanceof.ts](conformance/syntax-instanceof.ts) | Class instance checks |
66
- | JS truthiness | ✅ | [syntax-optional-params.ts](conformance/syntax-optional-params.ts) | `if (str)`, `!count`, `a \|\| fallback` on any type |
67
- | Loose equality (`==`) | ✅ | [semantics-loose-equality.ts](conformance/semantics-loose-equality.ts) | `bool`/`number`/`string` mixtures coerce like JS (`TnNumber`/`TnParseFloat`) |
68
- | Optional call (`fn?.()`) | ✅ | [syntax-optional-call.ts](conformance/syntax-optional-call.ts) | Nil check on the function value; result is nullable |
69
- | Comma operator | ✅ | [syntax-comma-operator.ts](conformance/syntax-comma-operator.ts) | In `for` headers (`i = 0, j = 10` / `i++, j--`) |
70
- | `void` operator | ✅ | [syntax-void-operator.ts](conformance/syntax-void-operator.ts) | Evaluates, then `nil` |
71
- | `new.target` | ✅ | [syntax-new-target.ts](conformance/syntax-new-target.ts) | Constructors pass the target class name through `super()` chains |
68
+ | Feature | Status | Probe | Notes |
69
+ | --------------------------------------------------------------- | :----: | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
70
+ | Arithmetic operators | ✅ | [syntax-arithmetic.ts](conformance/syntax-arithmetic.ts) | `+`, `-`, etc.; `%`/`%=` via `math.Mod` |
71
+ | Exponent operator | ✅ | [syntax-exponent.ts](conformance/syntax-exponent.ts) | `2 ** 10` |
72
+ | Bitwise operators | ✅ | [syntax-bitwise.ts](conformance/syntax-bitwise.ts) | `&`, `\|`, `^`, `<<`, `>>` |
73
+ | Unsigned shift | ✅ | [syntax-unsigned-shift.ts](conformance/syntax-unsigned-shift.ts) | `>>>` |
74
+ | Comparison operators | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | `==`, `!=`, `===`, `!==`, etc. |
75
+ | Logical operators | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | `&&`, `\|\|` |
76
+ | Increment / decrement | ✅ | [syntax-increment-expression.ts](conformance/syntax-increment-expression.ts) | `++`, `--`, incl. as expressions |
77
+ | Non-null assertion (`!`) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Stripped during transpilation |
78
+ | Ternary expressions | ✅ | [syntax-ternary.ts](conformance/syntax-ternary.ts) | `condition ? a : b` |
79
+ | Nullish coalescing | ✅ | [syntax-nullish.ts](conformance/syntax-nullish.ts) | `??` operator, incl. chains |
80
+ | Optional chaining | ✅ | [syntax-optional-chaining.ts](conformance/syntax-optional-chaining.ts) | `obj?.prop`, `arr?.[i]`, chains across calls |
81
+ | Nullish / logical assignment | ✅ | [syntax-logical-assignment.ts](conformance/syntax-logical-assignment.ts) | `??=`, `\|\|=`, `&&=` |
82
+ | `in` operator | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `"key" in obj` on records |
83
+ | `typeof` | ✅ | [syntax-typeof.ts](conformance/syntax-typeof.ts) | `typeof x === "string"`; `"function"` for function values |
84
+ | `instanceof` | ✅ | [syntax-instanceof.ts](conformance/syntax-instanceof.ts) | User classes, `Error` classes and Node globals (`URL`, `Uint8Array`, …) |
85
+ | JS truthiness | ✅ | [syntax-optional-params.ts](conformance/syntax-optional-params.ts) | `if (str)`, `!count`, `a \|\| fallback` on any type |
86
+ | Loose equality (`==`) | ✅ | [semantics-loose-equality.ts](conformance/semantics-loose-equality.ts), [semantics-any-variables.ts](conformance/semantics-any-variables.ts) | `bool`/`number`/`string` mixtures coerce like JS (`TnNumber`/`TnParseFloat`), also between `any` values (`TnLooseEqual`) |
87
+ | Optional call (`fn?.()`) | ✅ | [syntax-optional-call.ts](conformance/syntax-optional-call.ts) | Nil check on the function value; result is nullable |
88
+ | Comma operator | ✅ | [syntax-comma-operator.ts](conformance/syntax-comma-operator.ts) | In `for` headers (`i = 0, j = 10` / `i++, j--`) |
89
+ | `void` operator | ✅ | [syntax-void-operator.ts](conformance/syntax-void-operator.ts) | Evaluates, then `nil` |
90
+ | `new.target` | ✅ | [syntax-new-target.ts](conformance/syntax-new-target.ts) | Constructors pass the target class name through `super()` chains |
91
+ | `instanceof Map` / `Set` / `Date` / `Array`, subclass instances | ✅ | [syntax-instanceof-builtins.ts](conformance/syntax-instanceof-builtins.ts) | Maps and Sets made by `new Map()` / `new Set()` are tagged (records are not Maps); arrays exclude Buffers; `instanceof Parent` holds for subclass instances |
92
+ | `#x in obj` (private brand checks) | ✅ | [syntax-instanceof-builtins.ts](conformance/syntax-instanceof-builtins.ts) | An instance of the class declaring `#x`, or of a subclass |
72
93
 
73
94
  ## Control flow
74
95
 
75
- | Feature | Status | Probe | Notes |
76
- | ----------------------------------- | :----: | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
77
- | If / else statements | ✅ | [syntax-if-switch.ts](conformance/syntax-if-switch.ts) | Incl. unbraced bodies and else-if chains |
78
- | Switch statements | ✅ | [syntax-switch.ts](conformance/syntax-switch.ts) | Case and default statements |
79
- | Switch fallthrough | ✅ | [syntax-switch-fallthrough.ts](conformance/syntax-switch-fallthrough.ts) | Explicit fallthrough between cases |
80
- | `for` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | Standard `for` loops, incl. unbraced bodies |
81
- | `continue` | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | `continue` in all loop kinds |
82
- | `break` | ✅ | [syntax-if-switch.ts](conformance/syntax-if-switch.ts), [syntax-do-while.ts](conformance/syntax-do-while.ts) | In switch cases and loops |
83
- | `for...of` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts), [syntax-for-of-string.ts](conformance/syntax-for-of-string.ts) | Arrays, Maps, Sets, strings, tuples; `Object.entries()` unwrapping |
84
- | `for...in` loops | ✅ | [syntax-for-in.ts](conformance/syntax-for-in.ts) | Key range over records/maps |
85
- | `for await...of` | ✅ | [syntax-for-await.ts](conformance/syntax-for-await.ts) | Ranges over the async generator's channel |
86
- | `while` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | Transpiled to Go's `for` loops; assignment in condition |
87
- | `do...while` loops | ✅ | [syntax-do-while.ts](conformance/syntax-do-while.ts) | Implemented with conditional break |
88
- | Labeled loops | ✅ | [syntax-labeled-loops.ts](conformance/syntax-labeled-loops.ts) | `LabeledStatement` → Go labels; labeled `continue`/`break` |
89
- | `try` / `catch` / `finally` | ✅ | [syntax-try-catch-finally.ts](conformance/syntax-try-catch-finally.ts) | `throw` → `panic`; catch/finally via `defer`/`recover` |
90
- | Optional catch binding (`catch {}`) | ✅ | [syntax-try-catch-finally.ts](conformance/syntax-try-catch-finally.ts) | |
91
- | Custom error classes | ✅ | [syntax-custom-errors.ts](conformance/syntax-custom-errors.ts) | `extends Error` → embedded `TnError`; constructors take the message |
92
- | `Error.message` | ✅ | [syntax-error-message.ts](conformance/syntax-error-message.ts) | `throw new Error` panics with a `*TnError`; `.message` on caught values |
93
- | `Error` `cause` (`new Error(message, { cause })`, `err.cause`) | ✅ | [lib-node-fetch-bad-port.ts](conformance/lib-node-fetch-bad-port.ts) | Built-in error classes too |
94
- | Narrowing | ✅ | [syntax-typeof.ts](conformance/syntax-typeof.ts) | `T \| undefined` narrowed after `if (x)`, `x !== undefined`, early returns |
96
+ | Feature | Status | Probe | Notes |
97
+ | ------------------------------------------------------------------ | :----: | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
98
+ | If / else statements | ✅ | [syntax-if-switch.ts](conformance/syntax-if-switch.ts) | Incl. unbraced bodies and else-if chains |
99
+ | Switch statements | ✅ | [syntax-switch.ts](conformance/syntax-switch.ts) | Case and default statements |
100
+ | Switch fallthrough | ✅ | [syntax-switch-fallthrough.ts](conformance/syntax-switch-fallthrough.ts) | Explicit fallthrough between cases |
101
+ | `for` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | Standard `for` loops, incl. unbraced bodies |
102
+ | `continue` | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | `continue` in all loop kinds |
103
+ | `break` | ✅ | [syntax-if-switch.ts](conformance/syntax-if-switch.ts), [syntax-do-while.ts](conformance/syntax-do-while.ts) | In switch cases and loops |
104
+ | `for...of` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts), [syntax-for-of-string.ts](conformance/syntax-for-of-string.ts) | Arrays, Maps, Sets, strings, tuples; `Object.entries()` unwrapping |
105
+ | `for...in` loops | ✅ | [syntax-for-in.ts](conformance/syntax-for-in.ts) | Key range over records/maps |
106
+ | `for await...of` | ✅ | [syntax-for-await.ts](conformance/syntax-for-await.ts) | Ranges over the async generator's channel |
107
+ | `while` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | Transpiled to Go's `for` loops; assignment in condition |
108
+ | `do...while` loops | ✅ | [syntax-do-while.ts](conformance/syntax-do-while.ts) | Implemented with conditional break |
109
+ | Labeled loops | ✅ | [syntax-labeled-loops.ts](conformance/syntax-labeled-loops.ts) | `LabeledStatement` → Go labels; labeled `continue`/`break` |
110
+ | `try` / `catch` / `finally` | ✅ | [syntax-try-catch-finally.ts](conformance/syntax-try-catch-finally.ts) | `throw` → `panic`; catch/finally via `defer`/`recover` |
111
+ | Optional catch binding (`catch {}`) | ✅ | [syntax-try-catch-finally.ts](conformance/syntax-try-catch-finally.ts) | |
112
+ | Custom error classes | ✅ | [syntax-custom-errors.ts](conformance/syntax-custom-errors.ts) | `extends Error` → embedded `TnError`; constructors take the message |
113
+ | `Error.message` | ✅ | [syntax-error-message.ts](conformance/syntax-error-message.ts) | `throw new Error` panics with a `*TnError`; `.message` on caught values |
114
+ | `Error` `cause` (`new Error(message, { cause })`, `err.cause`) | ✅ | [lib-node-fetch-bad-port.ts](conformance/lib-node-fetch-bad-port.ts) | Built-in error classes too |
115
+ | Narrowing | ✅ | [syntax-typeof.ts](conformance/syntax-typeof.ts) | `T \| undefined` narrowed after `if (x)`, `x !== undefined`, early returns |
116
+ | Exhaustive `switch` without `default`; statements after a `switch` | ✅ | [syntax-switch-exhaustive.ts](conformance/syntax-switch-exhaustive.ts) | A function that can end without a `return` returns its result type's zero value (JS: `undefined`) |
117
+ | Labeled blocks and statements (`label: { … break label; }`) | ✅ | [syntax-labeled-blocks.ts](conformance/syntax-labeled-blocks.ts) | `break label` jumps past the statement (`goto`) |
118
+ | Throwing non-`Error` values (`throw 'x'`, `throw { code: 1 }`) | ✅ | — | Caught as `interface{}`; properties read dynamically |
119
+ | `debugger` | ✅ | — | Erased |
120
+ | `with` | 🚫 | — | Not allowed in strict mode (modules are strict) |
95
121
 
96
122
  ## Functions
97
123
 
98
- | Feature | Status | Probe | Notes |
99
- | --------------------------------------------- | :----: | ---------------------------------------------------------------------------- | --------------------------------------------------------------------- |
100
- | Function declarations | ✅ | [syntax-functions.ts](conformance/syntax-functions.ts) | Transpiled to Go functions |
101
- | Arrow functions | ✅ | [syntax-arrow-functions.ts](conformance/syntax-arrow-functions.ts) | Transpiled to anonymous functions |
102
- | IIFEs | ✅ | [syntax-iife.ts](conformance/syntax-iife.ts) | `(() => { ... })()` and `(function name() { ... })()` |
103
- | Closures over mutable state | ✅ | [syntax-closures.ts](conformance/syntax-closures.ts) | Functions capturing and mutating outer variables; per-iteration `let` |
104
- | Function types | ✅ | [syntax-closures.ts](conformance/syntax-closures.ts) | `() => number`, `(x: number) => string` as type annotations |
105
- | Default parameter values | ✅ | [syntax-default-params.ts](conformance/syntax-default-params.ts) | `function(x = defaultValue)`, incl. constructors, methods, arrows |
106
- | Rest parameters | ✅ | [syntax-rest-params.ts](conformance/syntax-rest-params.ts) | `function(...args: T[])` → Go variadic |
107
- | Spread in calls | ✅ | [syntax-spread-call.ts](conformance/syntax-spread-call.ts) | `f(...args)` incl. tuples |
108
- | Optional parameters | ✅ | [syntax-optional-params.ts](conformance/syntax-optional-params.ts) | `function f(x?: string)` |
109
- | Destructured parameters | ✅ | [syntax-destructuring-params.ts](conformance/syntax-destructuring-params.ts) | `function f({ a, b }: T)`, `([x, y]: number[])` |
110
- | Contextual object-literal arguments | ✅ | [syntax-contextual-arguments.ts](conformance/syntax-contextual-arguments.ts) | Struct type inferred from parameter / return type |
111
- | Recursion | ✅ | [syntax-recursion.ts](conformance/syntax-recursion.ts) | Direct self-recursion |
112
- | Recursive arrow functions | ✅ | [syntax-recursive-arrow.ts](conformance/syntax-recursive-arrow.ts) | `const f = () => … f() …` → declared, then assigned |
113
- | Generators (`function*` / `yield` / `yield*`) | ✅ | [syntax-generators.ts](conformance/syntax-generators.ts) | `function*` runs in a goroutine sending yields over a channel; `for...of` ranges it |
114
- | Async generators (`async function*`) | ✅ | [syntax-async-generators.ts](conformance/syntax-async-generators.ts) | Goroutine + channel, consumed with `for await` |
115
- | Custom iterators (`Symbol.iterator`) | ✅ | [syntax-custom-iterators.ts](conformance/syntax-custom-iterators.ts) | `*[Symbol.iterator]()` → a `Symbol_iterator()` channel method |
116
- | `as const` assertions | ✅ | [syntax-as-const.ts](conformance/syntax-as-const.ts) | Erased during transpilation |
117
- | Function overloads | ✅ | [syntax-function-overloads.ts](conformance/syntax-function-overloads.ts) | Signatures are erased; the implementation is emitted |
118
- | `this` parameter (`function f(this: T)`) | ✅ | [syntax-this-parameter.ts](conformance/syntax-this-parameter.ts) | Erased |
119
- | `arguments` object | ✅ | [syntax-arguments.ts](conformance/syntax-arguments.ts) | Functions reading it take extra arguments variadically (`[]interface{}`) |
124
+ | Feature | Status | Probe | Notes |
125
+ | --------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
126
+ | Function declarations | ✅ | [syntax-functions.ts](conformance/syntax-functions.ts) | Transpiled to Go functions |
127
+ | Arrow functions | ✅ | [syntax-arrow-functions.ts](conformance/syntax-arrow-functions.ts) | Transpiled to anonymous functions |
128
+ | IIFEs | ✅ | [syntax-iife.ts](conformance/syntax-iife.ts) | `(() => { ... })()` and `(function name() { ... })()` |
129
+ | Closures over mutable state | ✅ | [syntax-closures.ts](conformance/syntax-closures.ts) | Functions capturing and mutating outer variables; per-iteration `let` |
130
+ | Function types | ✅ | [syntax-closures.ts](conformance/syntax-closures.ts) | `() => number`, `(x: number) => string` as type annotations |
131
+ | Default parameter values | ✅ | [syntax-default-params.ts](conformance/syntax-default-params.ts) | `function(x = defaultValue)`, incl. constructors, methods, arrows |
132
+ | Rest parameters | ✅ | [syntax-rest-params.ts](conformance/syntax-rest-params.ts) | `function(...args: T[])` → Go variadic |
133
+ | Spread in calls | ✅ | [syntax-spread-call.ts](conformance/syntax-spread-call.ts) | `f(...args)` incl. tuples |
134
+ | Optional parameters | ✅ | [syntax-optional-params.ts](conformance/syntax-optional-params.ts) | `function f(x?: string)` |
135
+ | Destructured parameters | ✅ | [syntax-destructuring-params.ts](conformance/syntax-destructuring-params.ts) | `function f({ a, b }: T)`, `([x, y]: number[])` |
136
+ | Contextual object-literal arguments | ✅ | [syntax-contextual-arguments.ts](conformance/syntax-contextual-arguments.ts) | Struct type inferred from parameter / return type |
137
+ | Recursion | ✅ | [syntax-recursion.ts](conformance/syntax-recursion.ts) | Direct self-recursion |
138
+ | Recursive arrow functions | ✅ | [syntax-recursive-arrow.ts](conformance/syntax-recursive-arrow.ts) | `const f = () => … f() …` → declared, then assigned |
139
+ | Generators (`function*` / `yield` / `yield*`) | ✅ | [syntax-generators.ts](conformance/syntax-generators.ts) | `function*` runs in a goroutine sending yields over a channel; `for...of` ranges it |
140
+ | Async generators (`async function*`) | ✅ | [syntax-async-generators.ts](conformance/syntax-async-generators.ts) | Goroutine + channel, consumed with `for await` |
141
+ | Custom iterators (`Symbol.iterator`) | ✅ | [syntax-custom-iterators.ts](conformance/syntax-custom-iterators.ts) | `*[Symbol.iterator]()` → a `Symbol_iterator()` channel method |
142
+ | `as const` assertions | ✅ | [syntax-as-const.ts](conformance/syntax-as-const.ts) | Erased during transpilation |
143
+ | Function overloads | ✅ | [syntax-function-overloads.ts](conformance/syntax-function-overloads.ts) | Signatures are erased; the implementation is emitted |
144
+ | `this` parameter (`function f(this: T)`) | ✅ | [syntax-this-parameter.ts](conformance/syntax-this-parameter.ts) | Erased |
145
+ | `arguments` object | ✅ | [syntax-arguments.ts](conformance/syntax-arguments.ts) | Functions reading it take extra arguments variadically (`[]interface{}`) |
146
+ | Top-level `await` | ✅ | — | In modules (files with an `import` / `export`) |
147
+ | Generator `next()` | ✅ | [lib-iterator-helpers.ts](conformance/lib-iterator-helpers.ts) | `{ value, done }` |
148
+ | Generator `next(value)` (sending a value in) / `return()` / `throw()` | ❌ | — | Generators are goroutines feeding a channel: values only flow out |
149
+ | `fn.call` / `fn.apply` / `fn.bind` | ✅ | [syntax-function-values.ts](conformance/syntax-function-values.ts) | Function declarations and function values; `apply` spreads the array over the parameters; `thisArg` is ignored (methods taken from an object are already bound in Go) |
150
+ | `fn.name` / `fn.length` | ✅ | [syntax-function-values.ts](conformance/syntax-function-values.ts) | Known at compile time for declared functions, classes and function variables |
151
+ | `eval` / `new Function(…)` | 🚫 | — | Compile and run JavaScript at runtime: needs a JavaScript engine |
120
152
 
121
153
  ## Classes & interfaces
122
154
 
123
- | Feature | Status | Probe | Notes |
124
- | ---------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
125
- | Classes | ✅ | [syntax-class.ts](conformance/syntax-class.ts) | Transpiled to Go structs with constructor and receiver methods |
126
- | Constructor parameter properties | ✅ | [syntax-class-parameter-properties.ts](conformance/syntax-class-parameter-properties.ts) | `constructor(private x: number)` |
127
- | Class inheritance | ✅ | [syntax-class-inheritance.ts](conformance/syntax-class-inheritance.ts) | `super.method()` → `self.Parent.method()`; inherited methods copied for `this` dispatch |
128
- | `implements` clauses | ✅ | [syntax-class-implements.ts](conformance/syntax-class-implements.ts) | `class C implements I` |
129
- | Interface `extends` | ✅ | [syntax-interface-extends.ts](conformance/syntax-interface-extends.ts) | Inherited properties flattened into the derived struct |
130
- | Static members | ✅ | [syntax-class-static.ts](conformance/syntax-class-static.ts) | Static members → package-level `Class_member` vars/functions |
131
- | Getters / setters (classes) | ✅ | [syntax-class-getters.ts](conformance/syntax-class-getters.ts) | `c.v` reads/writes rewrite to `Get_v()`/`Set_v()` accessor calls |
132
- | Getters (object literals) | ✅ | [syntax-object-getters.ts](conformance/syntax-object-getters.ts) | Getter closures stored as function fields; reads invoke them |
133
- | Object-literal methods | ✅ | [syntax-object-methods.ts](conformance/syntax-object-methods.ts) | Method closures stored as function fields capturing the instance (`this` → the object) |
134
- | Private `#` fields | ✅ | [syntax-class-private-fields.ts](conformance/syntax-class-private-fields.ts) | `#secret` → a plain (name-mangled) struct field |
135
- | Access modifiers (`private` / `protected` / `public` on members) | ✅ | [syntax-access-modifiers.ts](conformance/syntax-access-modifiers.ts) | `private` / `protected` / `public` are erased |
136
- | Abstract classes | ✅ | [syntax-class-abstract.ts](conformance/syntax-class-abstract.ts) | Abstract members skipped; concrete methods copied onto subclasses |
137
- | Static initialization blocks (`static {}`) | ✅ | [syntax-static-blocks.ts](conformance/syntax-static-blocks.ts) | Go `func init()` |
138
- | Class expressions (`const C = class {}`) | ✅ | [syntax-class-expressions.ts](conformance/syntax-class-expressions.ts) | `const C = class {…}` becomes a class named after the variable |
139
- | Interfaces | ✅ | [syntax-class-implements.ts](conformance/syntax-class-implements.ts) | Transpiled to Go interfaces |
140
- | Optional properties | ✅ | [syntax-optional-chaining.ts](conformance/syntax-optional-chaining.ts) | `prop?: Type` in interfaces/types |
141
- | Type-aware method dispatch | ✅ | [semantics-method-dispatch.ts](conformance/semantics-method-dispatch.ts) | Class `.push()` / `.length` not confused with array builtins |
142
- | Index signatures (`[key: string]: T`) | ✅ | [syntax-index-signatures.ts](conformance/syntax-index-signatures.ts) | `{ [k: K]: V }` is `Record<K, V>` (an ordered Go map) |
155
+ | Feature | Status | Probe | Notes |
156
+ | ---------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
157
+ | Classes | ✅ | [syntax-class.ts](conformance/syntax-class.ts) | Transpiled to Go structs with constructor and receiver methods |
158
+ | Constructor parameter properties | ✅ | [syntax-class-parameter-properties.ts](conformance/syntax-class-parameter-properties.ts) | `constructor(private x: number)` |
159
+ | Class inheritance | ✅ | [syntax-class-inheritance.ts](conformance/syntax-class-inheritance.ts) | `super.method()` → `self.Parent.method()`; inherited methods copied for `this` dispatch |
160
+ | `implements` clauses | ✅ | [syntax-class-implements.ts](conformance/syntax-class-implements.ts) | `class C implements I` |
161
+ | Interface `extends` | ✅ | [syntax-interface-extends.ts](conformance/syntax-interface-extends.ts) | Inherited properties flattened into the derived struct |
162
+ | Static members | ✅ | [syntax-class-static.ts](conformance/syntax-class-static.ts) | Static members → package-level `Class_member` vars/functions |
163
+ | Getters / setters (classes) | ✅ | [syntax-class-getters.ts](conformance/syntax-class-getters.ts) | `c.v` reads/writes rewrite to `Get_v()`/`Set_v()` accessor calls |
164
+ | Getters (object literals) | ✅ | [syntax-object-getters.ts](conformance/syntax-object-getters.ts) | Getter closures stored as function fields; reads invoke them |
165
+ | Object-literal methods | ✅ | [syntax-object-methods.ts](conformance/syntax-object-methods.ts) | Method closures stored as function fields capturing the instance (`this` → the object) |
166
+ | Private `#` fields | ✅ | [syntax-class-private-fields.ts](conformance/syntax-class-private-fields.ts) | `#secret` → a `__secret` struct field, left out of `JSON.stringify` and `console.log` |
167
+ | Access modifiers (`private` / `protected` / `public` on members) | ✅ | [syntax-access-modifiers.ts](conformance/syntax-access-modifiers.ts) | `private` / `protected` / `public` are erased |
168
+ | Abstract classes | ✅ | [syntax-class-abstract.ts](conformance/syntax-class-abstract.ts) | Abstract members skipped; concrete methods copied onto subclasses |
169
+ | Static initialization blocks (`static {}`) | ✅ | [syntax-static-blocks.ts](conformance/syntax-static-blocks.ts) | Go `func init()` |
170
+ | Class expressions (`const C = class {}`) | ✅ | [syntax-class-expressions.ts](conformance/syntax-class-expressions.ts) | `const C = class {…}` becomes a class named after the variable |
171
+ | Interfaces | ✅ | [syntax-class-implements.ts](conformance/syntax-class-implements.ts) | Transpiled to Go interfaces |
172
+ | Optional properties | ✅ | [syntax-optional-chaining.ts](conformance/syntax-optional-chaining.ts) | `prop?: Type` in interfaces/types |
173
+ | Type-aware method dispatch | ✅ | [semantics-method-dispatch.ts](conformance/semantics-method-dispatch.ts) | Class `.push()` / `.length` not confused with array builtins |
174
+ | Index signatures (`[key: string]: T`) | ✅ | [syntax-index-signatures.ts](conformance/syntax-index-signatures.ts) | `{ [k: K]: V }` is `Record<K, V>` (an ordered Go map) |
175
+ | Methods without a return-type annotation | ✅ | [syntax-method-return-inference.ts](conformance/syntax-method-return-inference.ts) | Inferred from the returns, as for functions (also returns nested in `if` / loops / `switch` / `try`); an inherited `return this` returns the subclass |
176
+ | Field initializers reading parameter properties or parent fields | ✅ | [syntax-class-field-order.ts](conformance/syntax-class-field-order.ts) | `super()`, then parameter properties, then field initializers, then the constructor body (TS's ES2020 order) |
177
+ | Arrow-function fields (`h = () => this.x`), fields reading earlier fields | ✅ | — | Run in the constructor; `this` is the instance |
178
+ | Private methods (`#m()`) | ✅ | [syntax-method-return-inference.ts](conformance/syntax-method-return-inference.ts) | |
179
+ | A private and a public member with the same name (`#x` and `x`) | ✅ | [syntax-private-public-names.ts](conformance/syntax-private-public-names.ts) | `#x` is the Go field `__x` |
180
+ | Private accessors (`get #x()`) / static private fields (`static #x`) | ✅ | [syntax-class-accessor-inheritance.ts](conformance/syntax-class-accessor-inheritance.ts), [syntax-class-static-inheritance.ts](conformance/syntax-class-static-inheritance.ts) | |
181
+ | `accessor` fields | ✅ | — | Plain fields (decorating them is not supported) |
182
+ | Static inheritance (`Child.staticOfParent()`) | ✅ | [syntax-class-static-inheritance.ts](conformance/syntax-class-static-inheritance.ts) | Resolved to the declaring class's `Parent_member` at compile time |
183
+ | Inherited getters / setters, `super.x` on accessors | ✅ | [syntax-class-accessor-inheritance.ts](conformance/syntax-class-accessor-inheritance.ts) | Accessors are copied onto subclasses like methods |
184
+ | Object-literal setters (`set x(v) {}`) | ✅ | [syntax-object-setters.ts](conformance/syntax-object-setters.ts) | A `Set_x` closure field: `o.x = v` calls it |
185
+ | Mixins (class factories, `return class extends Base {}`, `class extends f()`) | ❌ | — | `Unsupported syntax: ClassExpression` outside `const C = class {}` |
186
+ | Polymorphic `this` return types (fluent chains) | ✅ | [syntax-polymorphic-this.ts](conformance/syntax-polymorphic-this.ts) | `this` is the class; methods inherited by a subclass return the subclass |
187
+ | Dynamic keys on class instances and typed objects (`inst[key]`) | ✅ | [syntax-instance-keys.ts](conformance/syntax-instance-keys.ts) | A `switch` over the declared fields and getters (reads and writes); through `any`, reflection |
188
+ | Declaration merging (interface + interface, enum + enum, class + interface) | ✅ | [syntax-declaration-merging.ts](conformance/syntax-declaration-merging.ts) | Merged within one scope; an interface adds its properties to a same-named class as fields; namespace + function merging works too |
189
+ | Prototype mutation (`C.prototype.m = …`, `Object.setPrototypeOf`, `util.inherits`) | 🚫 | — | Classes are static Go structs with fixed method sets |
143
190
 
144
191
  ## Generics
145
192
 
146
- | Feature | Status | Probe | Notes |
147
- | ------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ---------------------------------- |
148
- | Generic functions | ✅ | [syntax-generic-functions.ts](conformance/syntax-generic-functions.ts) | Type parameters → Go generics; call sites infer from arguments |
149
- | Generic classes | ✅ | [syntax-generic-classes.ts](conformance/syntax-generic-classes.ts) | Type parameters via Go generics |
150
- | Generic constraints (`<T extends U>`) | ✅ | [syntax-generic-constraints.ts](conformance/syntax-generic-constraints.ts) | Object-type bounds become `any`; properties of `T` values read dynamically |
151
- | Default type parameters (`<T = D>`) | ✅ | [syntax-generic-defaults.ts](conformance/syntax-generic-defaults.ts) | Defaults are erased; Go infers from arguments |
152
- | Generic interfaces / type aliases | ✅ | [syntax-generic-interfaces.ts](conformance/syntax-generic-interfaces.ts) | Go generic structs; literals instantiate them (`Box[float64]{…}`) |
153
- | `const` type parameters / variance annotations (`in` / `out`) | ✅ | [syntax-const-type-parameters.ts](conformance/syntax-const-type-parameters.ts) | Erased; object literals of method interfaces use an adapter struct |
193
+ | Feature | Status | Probe | Notes |
194
+ | ------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
195
+ | Generic functions | ✅ | [syntax-generic-functions.ts](conformance/syntax-generic-functions.ts) | Type parameters → Go generics; call sites infer from arguments |
196
+ | Generic classes | ✅ | [syntax-generic-classes.ts](conformance/syntax-generic-classes.ts) | Type parameters via Go generics |
197
+ | Generic constraints (`<T extends U>`) | ✅ | [syntax-generic-constraints.ts](conformance/syntax-generic-constraints.ts) | Object-type bounds become `any`; properties of `T` values read dynamically |
198
+ | Default type parameters (`<T = D>`) | ✅ | [syntax-generic-defaults.ts](conformance/syntax-generic-defaults.ts) | Defaults are erased; Go infers from arguments |
199
+ | Generic interfaces / type aliases | ✅ | [syntax-generic-interfaces.ts](conformance/syntax-generic-interfaces.ts) | Go generic structs; literals instantiate them (`Box[float64]{…}`) |
200
+ | `const` type parameters / variance annotations (`in` / `out`) | ✅ | [syntax-const-type-parameters.ts](conformance/syntax-const-type-parameters.ts) | Erased; object literals of method interfaces use an adapter struct |
154
201
 
155
202
  ## Enums
156
203
 
157
- | Feature | Status | Probe | Notes |
158
- | ------------------------------------- | :----: | ------------------------------------------------------------ | -------------------------------------------- |
159
- | Numeric enums | ✅ | [syntax-enum-numeric.ts](conformance/syntax-enum-numeric.ts) | Numeric members are `float64` constants; string enums keep a named type |
160
- | String enums | ✅ | [syntax-enum-string.ts](conformance/syntax-enum-string.ts) | `enum` declarations and member access |
161
- | `const enum` | ✅ | [syntax-const-enum.ts](conformance/syntax-const-enum.ts) | Compiled like a regular enum |
162
- | Computed / heterogeneous enum members | ✅ | [syntax-enum-computed.ts](conformance/syntax-enum-computed.ts) | Computed members assigned in source order; mixed enums keep each member's type |
204
+ | Feature | Status | Probe | Notes |
205
+ | ---------------------------------------------- | :----: | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
206
+ | Numeric enums | ✅ | [syntax-enum-numeric.ts](conformance/syntax-enum-numeric.ts) | Numeric members are `float64` constants; string enums keep a named type |
207
+ | String enums | ✅ | [syntax-enum-string.ts](conformance/syntax-enum-string.ts) | `enum` declarations and member access |
208
+ | `const enum` | ✅ | [syntax-const-enum.ts](conformance/syntax-const-enum.ts) | Compiled like a regular enum |
209
+ | Computed / heterogeneous enum members | ✅ | [syntax-enum-computed.ts](conformance/syntax-enum-computed.ts) | Computed members assigned in source order; mixed enums keep each member's type |
210
+ | Reverse mapping (`Color[0]`), `Enum['Member']` | ✅ | [syntax-enum-reverse.ts](conformance/syntax-enum-reverse.ts) | A generated `Color__name` function: the last member with the value wins; an unknown value gives `""` (JS: `undefined`). String enum members concatenate and print as strings |
163
211
 
164
212
  ## Type-system features
165
213
 
166
- | Feature | Status | Probe | Notes |
167
- | --------------------------------------------------------- | :----: | -------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
168
- | Type aliases | ✅ | [syntax-type-aliases.ts](conformance/syntax-type-aliases.ts) | `type P = { x: number }` → Go struct; alias-of-alias |
169
- | Union types | ✅ | [syntax-union-types.ts](conformance/syntax-union-types.ts) | Narrowed via `typeof` checks |
170
- | Type guards (`is`) | ✅ | [syntax-type-guards.ts](conformance/syntax-type-guards.ts) | `p is T` → Go `bool`; `in` checks struct fields at runtime |
171
- | `as` assertions | ✅ | [syntax-type-aliases.ts](conformance/syntax-type-aliases.ts) | `x as T`, incl. angle-bracket syntax |
172
- | Self-host contextual typing | ✅ | [syntax-selfhost-context.ts](conformance/syntax-selfhost-context.ts) | Object/array literals typed from context, `Record` literals, `in`, `any` params |
173
- | Decorators (`@`) | ✅ | [syntax-decorators.ts](conformance/syntax-decorators.ts) | Standard method & class decorators, applied in source order; `this` is the receiver |
174
- | Namespaces / `module` blocks | ✅ | [syntax-namespaces.ts](conformance/syntax-namespaces.ts) | Flattened to prefixed declarations (`N.f` → `N_f`), nested and in types |
175
- | `override` modifier | ✅ | [syntax-override.ts](conformance/syntax-override.ts) | Erased |
176
- | `readonly` modifier (properties, `readonly T[]`) | ✅ | [syntax-readonly.ts](conformance/syntax-readonly.ts) | Erased (`readonly T[]` → `[]T`) |
177
- | `satisfies` operator | ✅ | [syntax-satisfies.ts](conformance/syntax-satisfies.ts) | Checked by tsc, erased; the type guides literals |
178
- | `keyof` / mapped types | ✅ | [syntax-keyof-mapped-types.ts](conformance/syntax-keyof-mapped-types.ts) | `keyof` → `string`; mapped types → structs (literal keys) or maps |
179
- | Conditional types | ✅ | [syntax-conditional-types.ts](conformance/syntax-conditional-types.ts) | Resolved to their branch's Go type |
180
- | `infer` types | ✅ | [syntax-infer-types.ts](conformance/syntax-infer-types.ts) | Resolved to their branch's Go type |
181
- | `import type` / `export type` | ✅ | [syntax-import-type.ts](conformance/syntax-import-type.ts) | Type-only imports are erased |
182
- | Intersection types (`A & B`) | ✅ | [syntax-intersection-types.ts](conformance/syntax-intersection-types.ts) | Object types merge into one struct |
183
- | Literal types (`'a' \| 'b'`) | ✅ | [syntax-literal-types.ts](conformance/syntax-literal-types.ts) | Erased; string/number/boolean literals map to their base Go types |
184
- | Tuple optional / rest / labeled elements | ✅ | [syntax-tuple-elements.ts](conformance/syntax-tuple-elements.ts) | Tuples are slices |
185
- | Indexed access types (`T['k']`) | ✅ | [syntax-indexed-access-types.ts](conformance/syntax-indexed-access-types.ts) | `T['k']` resolves to the member type |
186
- | Type-level `typeof` (`typeof obj`) | ✅ | [syntax-type-typeof.ts](conformance/syntax-type-typeof.ts) | The variable's Go type |
187
- | Template literal types | ✅ | [syntax-template-literal-types.ts](conformance/syntax-template-literal-types.ts) | Template literal types → `string` |
188
- | Utility types (`Partial`, `Pick`, `Omit`, …) | ✅ | [syntax-utility-types.ts](conformance/syntax-utility-types.ts) | `Partial` / `Required` / `Readonly` / `Pick` / `Omit` / `NonNullable` → the base type |
189
- | Assertion functions (`asserts x is T`) | ✅ | [syntax-assertion-functions.ts](conformance/syntax-assertion-functions.ts) | No return value |
190
- | Callable / construct signatures (`type F = { (): void }`) | ✅ | [syntax-callable-signatures.ts](conformance/syntax-callable-signatures.ts) | Function types; a class passed as a value is its constructor |
191
- | JSX / `.tsx` syntax | ✅ | [syntax-jsx.tsx](conformance/syntax-jsx.tsx) | Renders to HTML strings (text escaped); components are calls with props |
192
- | Ambient declarations (`declare`, `.d.ts`, `x!: T`) | ✅ | [syntax-ambient-declarations.ts](conformance/syntax-ambient-declarations.ts) | `declare` only types code; `declare const` is an unset variable |
193
- | `export =` / `import x = require()` | ✅ | [syntax-export-equals.ts](conformance/syntax-export-equals.ts) | `import x = require()` is a namespace import |
214
+ | Feature | Status | Probe | Notes |
215
+ | ------------------------------------------------------------------------------------ | :----: | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
216
+ | Type aliases | ✅ | [syntax-type-aliases.ts](conformance/syntax-type-aliases.ts) | `type P = { x: number }` → Go struct; alias-of-alias |
217
+ | Union types | ✅ | [syntax-union-types.ts](conformance/syntax-union-types.ts) | Narrowed via `typeof` checks |
218
+ | Type guards (`is`) | ✅ | [syntax-type-guards.ts](conformance/syntax-type-guards.ts) | `p is T` → Go `bool`; `in` checks struct fields at runtime |
219
+ | `as` assertions | ✅ | [syntax-type-aliases.ts](conformance/syntax-type-aliases.ts) | `x as T`, incl. angle-bracket syntax (`<T>x`); `any` values convert to `T` |
220
+ | Self-host contextual typing | ✅ | [syntax-selfhost-context.ts](conformance/syntax-selfhost-context.ts) | Object/array literals typed from context, `Record` literals, `in`, `any` params |
221
+ | Decorators (`@`) | ✅ | [syntax-decorators.ts](conformance/syntax-decorators.ts) | Standard method & class decorators, applied in source order; `this` is the receiver |
222
+ | Field / accessor / parameter decorators, `context.addInitializer`, `Symbol.metadata` | ❌ | — | Only method and class decorators: field and accessor decorators fail the type check (`ClassFieldDecoratorContext` / `ClassAccessorDecoratorContext` are not declared) |
223
+ | Namespaces / `module` blocks | ✅ | [syntax-namespaces.ts](conformance/syntax-namespaces.ts) | Flattened to prefixed declarations (`N.f` → `N_f`), nested and in types |
224
+ | `override` modifier | ✅ | [syntax-override.ts](conformance/syntax-override.ts) | Erased |
225
+ | `readonly` modifier (properties, `readonly T[]`) | ✅ | [syntax-readonly.ts](conformance/syntax-readonly.ts) | Erased (`readonly T[]` → `[]T`) |
226
+ | `satisfies` operator | ✅ | [syntax-satisfies.ts](conformance/syntax-satisfies.ts) | Checked by tsc, erased; the type guides literals |
227
+ | `keyof` / mapped types | ✅ | [syntax-keyof-mapped-types.ts](conformance/syntax-keyof-mapped-types.ts) | `keyof` → `string`; mapped types → structs (literal keys) or maps |
228
+ | Conditional types | ✅ | [syntax-conditional-types.ts](conformance/syntax-conditional-types.ts) | Resolved to their branch's Go type |
229
+ | `infer` types | ✅ | [syntax-infer-types.ts](conformance/syntax-infer-types.ts) | Resolved to their branch's Go type |
230
+ | `import type` / `export type` | ✅ | [syntax-import-type.ts](conformance/syntax-import-type.ts) | Type-only imports are erased |
231
+ | Intersection types (`A & B`) | ✅ | [syntax-intersection-types.ts](conformance/syntax-intersection-types.ts) | Object types merge into one struct |
232
+ | Literal types (`'a' \| 'b'`) | ✅ | [syntax-literal-types.ts](conformance/syntax-literal-types.ts) | Erased; string/number/boolean literals map to their base Go types |
233
+ | Tuple optional / rest / labeled elements | ✅ | [syntax-tuple-elements.ts](conformance/syntax-tuple-elements.ts) | Tuples are slices |
234
+ | Indexed access types (`T['k']`) | ✅ | [syntax-indexed-access-types.ts](conformance/syntax-indexed-access-types.ts) | `T['k']` resolves to the member type |
235
+ | Type-level `typeof` (`typeof obj`) | ✅ | [syntax-type-typeof.ts](conformance/syntax-type-typeof.ts) | The variable's Go type |
236
+ | Template literal types | ✅ | [syntax-template-literal-types.ts](conformance/syntax-template-literal-types.ts) | Template literal types → `string` |
237
+ | Utility types (`Partial`, `Pick`, `Omit`, …) | ✅ | [syntax-utility-types.ts](conformance/syntax-utility-types.ts) | `Partial` / `Required` / `Readonly` / `Pick` / `Omit` / `NonNullable` → the base type |
238
+ | Assertion functions (`asserts x is T`) | ✅ | [syntax-assertion-functions.ts](conformance/syntax-assertion-functions.ts) | No return value |
239
+ | Callable / construct signatures (`type F = { (): void }`) | ✅ | [syntax-callable-signatures.ts](conformance/syntax-callable-signatures.ts) | Function types; a class passed as a value is its constructor |
240
+ | JSX / `.tsx` syntax | ✅ | [syntax-jsx.tsx](conformance/syntax-jsx.tsx) | Renders to HTML strings (text escaped); components are calls with props |
241
+ | Ambient declarations (`declare`, `.d.ts`, `x!: T`) | ✅ | [syntax-ambient-declarations.ts](conformance/syntax-ambient-declarations.ts) | `declare` only types code; `declare const` is an unset variable |
242
+ | `export =` / `import x = require()` | ✅ | [syntax-export-equals.ts](conformance/syntax-export-equals.ts) | `import x = require()` is a namespace import |
243
+ | Recursive types (`type Tree = { children: Tree[] }`) | ✅ | — | Self-referencing structs |
194
244
 
195
245
  ## Modules & imports
196
246
 
197
- | Feature | Status | Probe | Notes |
198
- | -------------------------------------------------- | :----: | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
199
- | Named imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import { x } from './file'` |
200
- | Import renaming (`import { x as y }`) | ✅ | [syntax-import-renaming.ts](conformance/syntax-import-renaming.ts) | Local file imports |
201
- | Named exports (`export const` / `export function`) | ✅ | [syntax-import-local.ts](conformance/syntax-import-local.ts) | Helper [import-local-helper.ts](conformance/import-local-helper.ts) exports `multiply` |
202
- | Default imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import x from 'pkg'` — namespace stripped in output |
203
- | Namespace imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import * as x from 'pkg'` |
204
- | Local file imports | ✅ | [syntax-import-local.ts](conformance/syntax-import-local.ts) | Relative paths transpiled to a separate Go file (helper: [import-local-helper.ts](conformance/import-local-helper.ts)) |
205
- | Default export | ✅ | [syntax-default-export.ts](conformance/syntax-default-export.ts) | `export default function` |
206
- | Node.js built-in imports | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | `node:x` or bare (`'fs'`), named / default / namespace imports, subpaths (`fs/promises`) (see [Node builtins](#node-builtins-node)) |
207
- | Go package imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import { x } from 'go:pkg'` |
208
- | npm package imports | ✅ | [syntax-import-npm.ts](conformance/syntax-import-npm.ts) | `import { x } from 'pkg'` mapped to Go module imports |
209
- | Re-exports (`export { x } from`, `export *`) | ✅ | [syntax-re-exports.ts](conformance/syntax-re-exports.ts) | Re-exported files are included (one Go package) |
210
- | Dynamic `import()` | ✅ | [syntax-dynamic-import.ts](conformance/syntax-dynamic-import.ts) | `const m = await import('./x')` is a namespace import |
211
- | Side-effect imports (`import './mod'`) | ✅ | [syntax-side-effect-import.ts](conformance/syntax-side-effect-import.ts) | Module top-level statements run in Go's `init()` |
212
- | `import.meta.url` | ✅ | [syntax-import-meta.ts](conformance/syntax-import-meta.ts) | The `file://` URL of the running program (`os.Executable` → `pathToFileURL`) |
247
+ | Feature | Status | Probe | Notes |
248
+ | ------------------------------------------------------------------ | :----: | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
249
+ | Named imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import { x } from './file'` |
250
+ | Import renaming (`import { x as y }`) | ✅ | [syntax-import-renaming.ts](conformance/syntax-import-renaming.ts) | Local file imports |
251
+ | Named exports (`export const` / `export function`) | ✅ | [syntax-import-local.ts](conformance/syntax-import-local.ts) | Helper [import-local-helper.ts](conformance/import-local-helper.ts) exports `multiply` |
252
+ | Default imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import x from 'pkg'` — namespace stripped in output |
253
+ | Namespace imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import * as x from 'pkg'` |
254
+ | Local file imports | ✅ | [syntax-import-local.ts](conformance/syntax-import-local.ts) | Relative paths transpiled to a separate Go file (helper: [import-local-helper.ts](conformance/import-local-helper.ts)) |
255
+ | Default export | ✅ | [syntax-default-export.ts](conformance/syntax-default-export.ts) | `export default function` |
256
+ | Node.js built-in imports | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | `node:x` or bare (`'fs'`), named / default / namespace imports, subpaths (`fs/promises`) (see [Node builtins](#node-builtins-node)) |
257
+ | Go package imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import { x } from 'go:pkg'` |
258
+ | npm package imports | ✅ | [syntax-import-npm.ts](conformance/syntax-import-npm.ts) | `import { x } from 'pkg'` mapped to Go module imports |
259
+ | Re-exports (`export { x } from`, `export *`) | ✅ | [syntax-re-exports.ts](conformance/syntax-re-exports.ts) | Re-exported files are included (one Go package) |
260
+ | Dynamic `import()` | ✅ | [syntax-dynamic-import.ts](conformance/syntax-dynamic-import.ts) | `const m = await import('./x')` is a namespace import |
261
+ | Side-effect imports (`import './mod'`) | ✅ | [syntax-side-effect-import.ts](conformance/syntax-side-effect-import.ts) | Module top-level statements run in Go's `init()` |
262
+ | `import.meta.url` | ✅ | [syntax-import-meta.ts](conformance/syntax-import-meta.ts) | The `file://` URL of the running program (`os.Executable` → `pathToFileURL`) |
263
+ | JSON modules (`import data from './x.json' with { type: 'json' }`) | ✅ | [lib-json-modules.ts](conformance/lib-json-modules.ts) | Read at compile time and compiled as an object literal, so fields keep their types (helper [json-module-helper.json](conformance/json-module-helper.json)); needs `resolveJsonModule` and a `module` setting that allows import attributes in a project tsconfig |
213
264
 
214
265
  ## Async & timing
215
266
 
216
- | Feature | Status | Probe | Notes |
217
- | ---------------------------------------------------- | :----: | ------------------------------------------------------------ | -------------------------------------- |
218
- | `async` / `await` | ✅ | [syntax-async-await.ts](conformance/syntax-async-await.ts) | The body runs synchronously until its first `await`; `await` runs pending event-loop tasks while it waits; the loop drains before exit |
219
- | Async arrow callbacks (`emitter.on('x', async () => { await … })`, `test('t', async () => …)`) | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Run to completion when called (their awaits keep the event loop running), so the caller sees them finish before it continues |
220
- | `Promise` constructor / `.then` | ✅ | [syntax-promise-then.ts](conformance/syntax-promise-then.ts) | The executor runs synchronously; promises are buffered channels; `.then` callbacks run on the event loop |
221
- | `Promise.all` | ✅ | [syntax-promise-all.ts](conformance/syntax-promise-all.ts) | `TnPromiseAll` drains every promise channel into a slice |
222
- | `Promise.resolve` | ✅ | [lib-promise-resolve.ts](conformance/lib-promise-resolve.ts) | Buffered channel holding the value |
223
- | `Promise.reject` / `.catch` / `.finally` | ✅ | [lib-promise-catch.ts](conformance/lib-promise-catch.ts) | Rejected promises are closed channels with a reason; `await` rethrows |
224
- | `Promise.race` / `allSettled` / `any` | ✅ | [lib-promise-combinators.ts](conformance/lib-promise-combinators.ts) | Goroutine per promise; first settled / all settled / first fulfilled |
225
- | `clearTimeout` | ✅ | [lib-timers.ts](conformance/lib-timers.ts) | `TnClearTimeout` stops the timer |
226
- | `setInterval` / `clearInterval` | ✅ | [lib-set-interval.ts](conformance/lib-set-interval.ts) | `time.Ticker` posting to the event loop; the process lives until cleared |
227
- | `queueMicrotask` | ✅ | [lib-queue-microtask.ts](conformance/lib-queue-microtask.ts) | Runs after the current synchronous code (end of main or of an event-loop task) |
228
- | `setTimeout` | ✅ | [lib-set-timeout.ts](conformance/lib-set-timeout.ts) | `time.AfterFunc` posting the callback to the event loop, which keeps the process alive |
267
+ | Feature | Status | Probe | Notes |
268
+ | ---------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
269
+ | `async` / `await` | ✅ | [syntax-async-await.ts](conformance/syntax-async-await.ts) | The body runs synchronously until its first `await`; `await` runs pending event-loop tasks while it waits; the loop drains before exit |
270
+ | Async arrow callbacks (`emitter.on('x', async () => { await … })`, `test('t', async () => …)`) | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Run to completion when called (their awaits keep the event loop running), so the caller sees them finish before it continues |
271
+ | `Promise` constructor / `.then` | ✅ | [syntax-promise-then.ts](conformance/syntax-promise-then.ts) | The executor runs synchronously; promises are buffered channels; `.then` callbacks run on the event loop |
272
+ | `Promise.all` | ✅ | [syntax-promise-all.ts](conformance/syntax-promise-all.ts) | `TnPromiseAll` drains every promise channel into a slice |
273
+ | `Promise.resolve` | ✅ | [lib-promise-resolve.ts](conformance/lib-promise-resolve.ts) | Buffered channel holding the value |
274
+ | `Promise.reject` / `.catch` / `.finally` | ✅ | [lib-promise-catch.ts](conformance/lib-promise-catch.ts) | Rejected promises are closed channels with a reason; `await` rethrows |
275
+ | `Promise.race` / `allSettled` / `any` | ✅ | [lib-promise-combinators.ts](conformance/lib-promise-combinators.ts) | Goroutine per promise; first settled / all settled / first fulfilled |
276
+ | `clearTimeout` | ✅ | [lib-timers.ts](conformance/lib-timers.ts) | `TnClearTimeout` stops the timer |
277
+ | `setInterval` / `clearInterval` | ✅ | [lib-set-interval.ts](conformance/lib-set-interval.ts) | `time.Ticker` posting to the event loop; the process lives until cleared |
278
+ | `queueMicrotask` | ✅ | [lib-queue-microtask.ts](conformance/lib-queue-microtask.ts) | Runs after the current synchronous code (end of main or of an event-loop task) |
279
+ | `setTimeout` | ✅ | [lib-set-timeout.ts](conformance/lib-set-timeout.ts) | `time.AfterFunc` posting the callback to the event loop, which keeps the process alive |
280
+ | `resolve` / `reject` passed as values | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | `new Promise((resolve) => setTimeout(resolve, ms))` |
281
+ | Async class methods (instance, static, inherited, unannotated); `return otherPromise()` | ✅ | [syntax-async-methods.ts](conformance/syntax-async-methods.ts) | Lowered like async functions; a returned promise is awaited |
282
+ | `Promise.withResolvers` / `Promise.try` | ✅ | [lib-promise-extras.ts](conformance/lib-promise-extras.ts) | |
283
+ | Async arrows kept as values (`const f = async () => …`) | ✅ | [lib-promise-extras.ts](conformance/lib-promise-extras.ts) | Return a promise like async functions (concise bodies too); async arrows passed straight to a call run inline (see above) |
229
284
 
230
285
  ## Semantics (JS behaviour preserved)
231
286
 
232
- | Feature | Status | Probe | Notes |
233
- | ----------------------------------------- | :----: | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
234
- | Array reference semantics | ✅ | [semantics-array-reference.ts](conformance/semantics-array-reference.ts) | Array variables hold `*[]T` so aliases share the slice header |
235
- | Object reference semantics | ✅ | [semantics-object-reference.ts](conformance/semantics-object-reference.ts) | Aliased objects share state; [semantics-parameter-mutation.ts](conformance/semantics-parameter-mutation.ts) |
236
- | Object identity | ✅ | [semantics-object-identity.ts](conformance/semantics-object-identity.ts) | Equal literals are different references |
237
- | Object key order | ✅ | [semantics-object-key-order.ts](conformance/semantics-object-key-order.ts) | Insertion order preserved |
238
- | Map insertion order | ✅ | [semantics-map-order.ts](conformance/semantics-map-order.ts) | Iteration follows insertion order |
239
- | Set insertion order | ✅ | [semantics-set-order.ts](conformance/semantics-set-order.ts) | Spread follows insertion order |
240
- | Default sort is lexicographic | ✅ | [semantics-default-sort.ts](conformance/semantics-default-sort.ts) | `[10, 9, 1].sort()` → `1,10,9` |
241
- | Float math | ✅ | [semantics-float-math.ts](conformance/semantics-float-math.ts) | `7 / 2 === 3.5`, `0.1 + 0.2 !== 0.3` |
242
- | Integer precision | ✅ | [semantics-integer-precision.ts](conformance/semantics-integer-precision.ts) | `2 ** 53 + 1 === 2 ** 53` |
243
- | `NaN` semantics | ✅ | [semantics-nan.ts](conformance/semantics-nan.ts) | `NaN !== NaN`, `Number.isNaN(0 / 0)` |
244
- | String-number concatenation order | ✅ | [semantics-string-number-concat.ts](conformance/semantics-string-number-concat.ts) | `'a' + 1 + 2` vs `1 + 2 + 'a'` |
245
- | Array truthiness | ✅ | [semantics-array-truthy.ts](conformance/semantics-array-truthy.ts) | Empty array is truthy |
246
- | Loop closures capture per-iteration `let` | ✅ | [semantics-loop-closures.ts](conformance/semantics-loop-closures.ts) | |
247
- | Functions stored in Records | ✅ | [semantics-record-functions.ts](conformance/semantics-record-functions.ts) | `rec.fn()` → `rec.Get("fn")()`, also for names like `get` / `sort` |
287
+ | Feature | Status | Probe | Notes |
288
+ | --------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
289
+ | Array reference semantics | ✅ | [semantics-array-reference.ts](conformance/semantics-array-reference.ts) | Array variables hold `*[]T` so aliases share the slice header |
290
+ | `any[]` arrays mutated through a parameter (`function f(a: any[]) { a.push(x) }`) | ❌ | — | `any[]` arrays are plain `[]interface{}`, not shared references: a `push` inside the callee is lost to the caller (typed arrays share) |
291
+ | Object reference semantics | ✅ | [semantics-object-reference.ts](conformance/semantics-object-reference.ts) | Aliased objects share state; [semantics-parameter-mutation.ts](conformance/semantics-parameter-mutation.ts) |
292
+ | Object identity | ✅ | [semantics-object-identity.ts](conformance/semantics-object-identity.ts) | Equal literals are different references |
293
+ | Object key order | ✅ | [semantics-object-key-order.ts](conformance/semantics-object-key-order.ts) | Insertion order preserved |
294
+ | Map insertion order | ✅ | [semantics-map-order.ts](conformance/semantics-map-order.ts) | Iteration follows insertion order |
295
+ | Set insertion order | ✅ | [semantics-set-order.ts](conformance/semantics-set-order.ts) | Spread follows insertion order |
296
+ | Default sort is lexicographic | ✅ | [semantics-default-sort.ts](conformance/semantics-default-sort.ts) | `[10, 9, 1].sort()` → `1,10,9` |
297
+ | Float math | ✅ | [semantics-float-math.ts](conformance/semantics-float-math.ts) | `7 / 2 === 3.5`, `0.1 + 0.2 !== 0.3` |
298
+ | Integer precision | ✅ | [semantics-integer-precision.ts](conformance/semantics-integer-precision.ts) | `2 ** 53 + 1 === 2 ** 53` |
299
+ | `NaN` semantics | ✅ | [semantics-nan.ts](conformance/semantics-nan.ts) | `NaN !== NaN`, `Number.isNaN(0 / 0)` |
300
+ | String-number concatenation order | ✅ | [semantics-string-number-concat.ts](conformance/semantics-string-number-concat.ts) | `'a' + 1 + 2` vs `1 + 2 + 'a'` |
301
+ | Array truthiness | ✅ | [semantics-array-truthy.ts](conformance/semantics-array-truthy.ts) | Empty array is truthy |
302
+ | An object's own `length` field (`{ length: 3 }.length`) | ✅ | [semantics-length-field.ts](conformance/semantics-length-field.ts) | A field read, not an array length |
303
+ | Loop closures capture per-iteration `let` | ✅ | [semantics-loop-closures.ts](conformance/semantics-loop-closures.ts) | |
304
+ | Functions stored in Records | ✅ | [semantics-record-functions.ts](conformance/semantics-record-functions.ts) | `rec.fn()` → `rec.Get("fn")()`, also for names like `get` / `sort` |
305
+
306
+ ## Sample apps
307
+
308
+ End-to-end programs that combine many features the way real code does (they run in the suite like any probe).
309
+
310
+ | App | Probe | Covers |
311
+ | ------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
312
+ | `wc`-style CLI | [app-cli-wordcount.ts](conformance/app-cli-wordcount.ts) | `util.parseArgs`, `fs`, `path`, `os.EOL`, a class with a `Map` field, tuples sorted with a `\|\|` comparator, `reduce` into an object, `crypto` |
313
+ | JSON API on HTTP + SQLite | [app-http-sqlite.ts](conformance/app-http-sqlite.ts) | `http.createServer` routing, `URL`, `node:sqlite` prepared statements, `fetch` (POST / GET / DELETE), JSON bodies, status codes |
314
+ | Stream pipeline | [app-stream-pipeline.ts](conformance/app-stream-pipeline.ts) | A generator through `Readable.from`, a CSV-aggregating `Transform`, `Float64Array` series, `stream/promises` `pipeline` to files, gzip and Brotli streams, SHA-256 |
248
315
 
249
316
  ## Standard library
250
317
 
@@ -254,186 +321,219 @@ Every standard-library API TypeNative ports, split by module. Per
254
321
 
255
322
  ### `console`
256
323
 
257
- | API | Status | Probe | Notes |
258
- | ---------------------------------- | :----: | ------------------------------------------------------ | ------------------------------------------------------ |
259
- | `console.log` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | `fmt.Println`; non-string arguments print like Node (`util.inspect`), format strings like `util.format` |
260
- | `console.error` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | `fmt.Fprintln(os.Stderr, ...)` |
261
- | `console.warn` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | Mapped to stderr like `console.error` |
262
- | `console.time` / `console.timeEnd` / `console.timeLog` | ✅ | [lib-console-time.ts](conformance/lib-console-time.ts) | Node's format: `label: 1.234ms` |
263
- | `console.info` / `debug` / `dir` / `count` / `countReset` / `group` / `groupEnd` / `assert` / `trace` | ✅ | [lib-console-more.ts](conformance/lib-console-more.ts) | `group` indents every later console line; `assert` prints `Assertion failed` |
264
- | `console.table` (arrays, objects, `Map`, `Set`, a `properties` filter) | ✅ | [lib-node-console-table.ts](conformance/lib-node-console-table.ts) | Node's box-drawn layout (left-aligned cells); other values are logged as is |
324
+ | API | Status | Probe | Notes |
325
+ | ----------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
326
+ | `console.log` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | `fmt.Println`; non-string arguments print like Node (`util.inspect`), format strings like `util.format` |
327
+ | `console.error` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | `fmt.Fprintln(os.Stderr, ...)` |
328
+ | `console.warn` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | Mapped to stderr like `console.error` |
329
+ | `console.time` / `console.timeEnd` / `console.timeLog` | ✅ | [lib-console-time.ts](conformance/lib-console-time.ts) | Node's format: `label: 1.234ms` |
330
+ | `console.info` / `debug` / `dir` / `count` / `countReset` / `group` / `groupEnd` / `assert` / `trace` | ✅ | [lib-console-more.ts](conformance/lib-console-more.ts) | `group` indents every later console line; `assert` prints `Assertion failed` |
331
+ | `console.table` (arrays, objects, `Map`, `Set`, a `properties` filter) | ✅ | [lib-node-console-table.ts](conformance/lib-node-console-table.ts) | Node's box-drawn layout (left-aligned cells); other values are logged as is |
265
332
 
266
333
  ### `Math`
267
334
 
268
- | API | Status | Probe | Notes |
269
- | ------------------------------------------------------------------ | :----: | ------------------------------------------------------ | --------------------------------------------------------------- |
270
- | `Math.floor` / `ceil` / `round` | ✅ | [lib-math.ts](conformance/lib-math.ts) | Mapped to `math.Floor`, `math.Ceil`, `math.Round` |
271
- | `Math.abs` / `sqrt` / `pow` | ✅ | [lib-math.ts](conformance/lib-math.ts) | Mapped to corresponding `math` functions |
272
- | `Math.min` / `Math.max` | ✅ | [lib-math-min-max.ts](conformance/lib-math-min-max.ts) | Go builtins `min` / `max` |
273
- | `Math.max(...arr)` / spread & variadic | ✅ | [lib-math-min-max.ts](conformance/lib-math-min-max.ts) | Spread and any number of arguments via `slices.Max` / `max` |
274
- | `Math.random` | ✅ | [lib-math-random.ts](conformance/lib-math-random.ts) | Mapped to `rand.Float64()` |
275
- | `Math.log` / `log2` / `log10` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Log` / `math.Log2` / `math.Log10` |
276
- | `Math.sin` / `cos` / `tan` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Sin` / `math.Cos` / `math.Tan` |
277
- | `Math.trunc` / `sign` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Trunc` / inline sign check |
278
- | Constants (`Math.PI`, `Math.E`, …) | ✅ | [lib-math-constants.ts](conformance/lib-math-constants.ts) | `math.Pi`, `math.E`, `math.Sqrt2`, … |
279
- | `Math.asin` / `acos` / `atan` / `atan2` / `hypot` / `cbrt` / `exp` | ✅ | [lib-math-more.ts](conformance/lib-math-more.ts) | Corresponding `math` functions |
335
+ | API | Status | Probe | Notes |
336
+ | ----------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | ----------------------------------------------------------- |
337
+ | `Math.floor` / `ceil` / `round` | ✅ | [lib-math.ts](conformance/lib-math.ts) | Mapped to `math.Floor`, `math.Ceil`, `math.Round` |
338
+ | `Math.abs` / `sqrt` / `pow` | ✅ | [lib-math.ts](conformance/lib-math.ts) | Mapped to corresponding `math` functions |
339
+ | `Math.min` / `Math.max` | ✅ | [lib-math-min-max.ts](conformance/lib-math-min-max.ts) | Go builtins `min` / `max` |
340
+ | `Math.max(...arr)` / spread & variadic | ✅ | [lib-math-min-max.ts](conformance/lib-math-min-max.ts) | Spread and any number of arguments via `slices.Max` / `max` |
341
+ | `Math.random` | ✅ | [lib-math-random.ts](conformance/lib-math-random.ts) | Mapped to `rand.Float64()` |
342
+ | `Math.log` / `log2` / `log10` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Log` / `math.Log2` / `math.Log10` |
343
+ | `Math.sin` / `cos` / `tan` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Sin` / `math.Cos` / `math.Tan` |
344
+ | `Math.trunc` / `sign` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Trunc` / inline sign check |
345
+ | Constants (`Math.PI`, `Math.E`, …) | ✅ | [lib-math-constants.ts](conformance/lib-math-constants.ts) | `math.Pi`, `math.E`, `math.Sqrt2`, … |
346
+ | `Math.asin` / `acos` / `atan` / `atan2` / `hypot` / `cbrt` / `exp` | ✅ | [lib-math-more.ts](conformance/lib-math-more.ts) | Corresponding `math` functions |
347
+ | `Math.sinh` / `cosh` / `tanh` / `expm1` / `log1p` | ✅ | — | Corresponding `math` functions |
348
+ | `Math.fround` / `imul` / `clz32` / `asinh` / `acosh` / `atanh` / `sumPrecise` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | `sumPrecise` is a compensated (Neumaier) sum |
349
+ | `Math.f16round` | ❌ | — | Not declared |
280
350
 
281
351
  ### `JSON`
282
352
 
283
- | API | Status | Probe | Notes |
284
- | ---------------- | :----: | ---------------------------------------------------------- | ------------------------------------- |
285
- | `JSON.parse` | ✅ | [lib-json-parse.ts](conformance/lib-json-parse.ts) | Mapped to `encoding/json` `Unmarshal`; assigned to an interface type, the result converts into its struct |
286
- | `JSON.stringify` | ✅ | [lib-json-stringify.ts](conformance/lib-json-stringify.ts) | Reflection serializer includes unexported struct fields |
353
+ | API | Status | Probe | Notes |
354
+ | ----------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
355
+ | `JSON.parse` | ✅ | [lib-json-parse.ts](conformance/lib-json-parse.ts) | Mapped to `encoding/json` `Unmarshal`; assigned to an interface type, the result converts into its struct |
356
+ | `JSON.stringify` | ✅ | [lib-json-stringify.ts](conformance/lib-json-stringify.ts) | Reflection serializer includes unexported struct fields and inherited ones |
357
+ | `JSON.stringify` `space`, replacer (function or key list), `toJSON()`; circular structures; `JSON.parse` reviver and `SyntaxError`s | ✅ | [lib-json-options.ts](conformance/lib-json-options.ts) | Node's layout; Dates serialize as ISO strings, `Map` / `Set` as `{}`, bigints throw. A replacer or reviver returning `undefined` gives `null` (it doesn't drop the key) |
358
+ | Key order of `JSON.parse` objects | ✅ | [lib-object-keys-typed.ts](conformance/lib-object-keys-typed.ts) | Parsed objects are ordered records (a duplicate key keeps its first position and last value); `delete`, `in`, `for...in` and spreads keep the order |
287
359
 
288
360
  ### `Object`
289
361
 
290
- | API | Status | Probe | Notes |
291
- | ---------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------------------------------- |
292
- | `Object.keys` / `values` / `entries` | ✅ | [lib-object-helpers.ts](conformance/lib-object-helpers.ts) | Map key/value iteration helpers; typed results for maps and records |
293
- | `Object.assign` | ✅ | [lib-object-assign.ts](conformance/lib-object-assign.ts) | Sources (structs, maps, dynamic objects) copied into an ordered map |
294
- | `Object.freeze` / `seal` / `isFrozen` | ✅ | [lib-object-freeze.ts](conformance/lib-object-freeze.ts) | Integrity level tracked by identity; writes rejected by `Readonly<T>` types |
295
- | `Object.fromEntries` | ✅ | [lib-object-from-entries.ts](conformance/lib-object-from-entries.ts) | `TnFromEntries` → dynamic object |
296
- | `Object.hasOwn` / `defineProperty` / `getOwnPropertyNames` | ✅ | [lib-object-own.ts](conformance/lib-object-own.ts) | Maps, dynamic objects and typed objects (literal keys); `{ value }` descriptors |
362
+ | API | Status | Probe | Notes |
363
+ | ---------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
364
+ | `Object.keys` / `values` / `entries` | ✅ | [lib-object-helpers.ts](conformance/lib-object-helpers.ts) | Map key/value iteration helpers; typed results for maps and records |
365
+ | `Object.keys` / `values` / `entries`, `for...in` on typed objects (interfaces, object literals, class instances) | ✅ | [lib-object-keys-typed.ts](conformance/lib-object-keys-typed.ts) | Own data fields in declaration order, a parent class's first; no `#private` fields or accessors (they are on the prototype); unset optional properties are absent |
366
+ | `Object.assign` | ✅ | [lib-object-assign.ts](conformance/lib-object-assign.ts) | Sources (structs, maps, dynamic objects) copied into an ordered map |
367
+ | `Object.freeze` / `seal` / `preventExtensions` / `isFrozen` / `isSealed` / `isExtensible` | ✅ | [lib-object-freeze.ts](conformance/lib-object-freeze.ts) | Integrity level tracked by identity; writes rejected by `Readonly<T>` types (`preventExtensions` / `isSealed` / `isExtensible` not probed) |
368
+ | `Object.fromEntries` | ✅ | [lib-object-from-entries.ts](conformance/lib-object-from-entries.ts) | `TnFromEntries` → dynamic object |
369
+ | `Object.hasOwn` / `defineProperty` / `getOwnPropertyNames` | ✅ | [lib-object-own.ts](conformance/lib-object-own.ts) | Maps, dynamic objects and typed objects (literal keys); `{ value }` descriptors |
370
+ | `Object.hasOwn` / `defineProperty` with a non-literal key on a typed object | ✅ | [lib-object-own-computed.ts](conformance/lib-object-own-computed.ts) | A `switch` over the declared fields (an unset optional field is not own) |
371
+ | `Object.is` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | SameValue; two empty object literals may share an address in Go, so `Object.is({}, {})` can be `true` |
372
+ | `Object.groupBy` / `Map.groupBy` | ✅ | [lib-group-by.ts](conformance/lib-group-by.ts) | Groups in first-seen key order |
373
+ | `Object.create` / `getPrototypeOf` / `getOwnPropertyDescriptor(s)` / `defineProperties` | ❌ | — | Not declared |
297
374
 
298
375
  ### `String`
299
376
 
300
- | API | Status | Probe | Notes |
301
- | --------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ----------------------------------------------------------- |
302
- | Template literals | ✅ | [syntax-template-literals.ts](conformance/syntax-template-literals.ts) | Backtick strings with `${expr}` interpolation |
303
- | Tagged templates | ✅ | [syntax-tagged-templates.ts](conformance/syntax-tagged-templates.ts) | Desugared to `tag([...strings], ...values)` |
304
- | `toUpperCase` / `toLowerCase` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
305
- | `trim` / `trimStart` / `trimEnd` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
306
- | `split` / `join` | ✅ | [lib-string-split-join.ts](conformance/lib-string-split-join.ts) | Via `strings` package |
307
- | `includes` / `startsWith` / `endsWith` / `indexOf` (with `fromIndex`) | ✅ | [lib-string-search.ts](conformance/lib-string-search.ts) | Via `strings` package |
308
- | `replace` / `replaceAll` (string pattern) | ✅ | [lib-string-replace.ts](conformance/lib-string-replace.ts) | Via `strings` package |
309
- | `replace` / `replaceAll` (RegExp, `$1`/`$&`, fn replacer) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | `/g` vs first match, `$1`/`$&` patterns, function replacers |
310
- | `charAt` / `substring` / `slice` | ✅ | [lib-string-slice.ts](conformance/lib-string-slice.ts) | Direct Go string indexing/slicing |
311
- | `charCodeAt` / `String.fromCharCode` | ✅ | [lib-string-char-codes.ts](conformance/lib-string-char-codes.ts) | `charCodeAt` reads the byte; `String.fromCharCode` → `string(rune(n))` |
312
- | `concat` / `repeat` | ✅ | [lib-string-pad-repeat.ts](conformance/lib-string-pad-repeat.ts) | Concatenation and `strings.Repeat` |
313
- | `padStart` / `padEnd` | ✅ | [lib-string-pad-repeat.ts](conformance/lib-string-pad-repeat.ts) | Via `strings.Repeat` |
314
- | `localeCompare` | ✅ | [lib-string-compare.ts](conformance/lib-string-compare.ts) | `strings.Compare` → -1/0/1 |
315
- | `match` / `matchAll` / `search` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Via `regexp` package (`String.match` with groups) |
316
- | `at` (negative indices) | ✅ | [lib-array-at.ts](conformance/lib-array-at.ts) | Supports negative indices |
317
- | Unicode length / iteration | ✅ | [lib-string-unicode.ts](conformance/lib-string-unicode.ts) | `.length` counts runes; `[...str]` spreads runes |
318
- | `String.raw` | ✅ | [lib-string-raw.ts](conformance/lib-string-raw.ts) | Raw template text with values interpolated |
319
- | `normalize` | ✅ | [lib-string-normalize.ts](conformance/lib-string-normalize.ts) | `golang.org/x/text/unicode/norm`, copied from GOROOT's vendor tree (offline) |
377
+ | API | Status | Probe | Notes |
378
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
379
+ | Template literals | ✅ | [syntax-template-literals.ts](conformance/syntax-template-literals.ts) | Backtick strings with `${expr}` interpolation |
380
+ | Tagged templates | ✅ | [syntax-tagged-templates.ts](conformance/syntax-tagged-templates.ts) | Desugared to `tag([...strings], ...values)` |
381
+ | `toUpperCase` / `toLowerCase` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
382
+ | `trim` / `trimStart` / `trimEnd` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
383
+ | `split` / `join` | ✅ | [lib-string-split-join.ts](conformance/lib-string-split-join.ts) | Via `strings` package |
384
+ | `includes` / `startsWith` / `endsWith` / `indexOf` (with `fromIndex`) | ✅ | [lib-string-search.ts](conformance/lib-string-search.ts) | Via `strings` package |
385
+ | `replace` / `replaceAll` (string pattern) | ✅ | [lib-string-replace.ts](conformance/lib-string-replace.ts) | Via `strings` package |
386
+ | `replace` / `replaceAll` (RegExp, `$1`/`$&`, fn replacer) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | `/g` vs first match, `$1`/`$&` patterns, function replacers |
387
+ | `charAt` / `substring` / `slice` | ✅ | [lib-string-slice.ts](conformance/lib-string-slice.ts) | Direct Go string indexing/slicing |
388
+ | `charCodeAt` / `String.fromCharCode` | ✅ | [lib-string-char-codes.ts](conformance/lib-string-char-codes.ts) | `charCodeAt` reads the byte; `String.fromCharCode` → `string(rune(n))` |
389
+ | `concat` / `repeat` | ✅ | [lib-string-pad-repeat.ts](conformance/lib-string-pad-repeat.ts) | Concatenation and `strings.Repeat` |
390
+ | `padStart` / `padEnd` | ✅ | [lib-string-pad-repeat.ts](conformance/lib-string-pad-repeat.ts) | Via `strings.Repeat` |
391
+ | `localeCompare` | ✅ | [lib-string-compare.ts](conformance/lib-string-compare.ts) | `strings.Compare` → -1/0/1: code-unit order, not locale-aware |
392
+ | `match` / `matchAll` / `search` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Via `regexp` package (`String.match` with groups) |
393
+ | `at` (negative indices) | ✅ | [lib-array-at.ts](conformance/lib-array-at.ts) | Supports negative indices |
394
+ | Unicode length / iteration | ✅ | [lib-string-unicode.ts](conformance/lib-string-unicode.ts) | `.length` counts runes; `[...str]` spreads runes |
395
+ | `String.raw` | ✅ | [lib-string-raw.ts](conformance/lib-string-raw.ts) | Raw template text with values interpolated |
396
+ | `normalize` | ✅ | [lib-string-normalize.ts](conformance/lib-string-normalize.ts) | `golang.org/x/text/unicode/norm`, copied from GOROOT's vendor tree (offline) |
397
+ | `split(sep, limit)` / `lastIndexOf(s, fromIndex)` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | |
398
+ | `localeCompare(s, locales, options)` | ❌ | — | Locales / options are not declared; the comparison is by code unit |
399
+ | `codePointAt` / `String.fromCodePoint` / `substr` / `trimLeft` / `trimRight` / `isWellFormed` / `toWellFormed` / `toLocaleUpperCase` / `toLocaleLowerCase` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | `codePointAt` past the end is `NaN` (JS: `undefined`); the locale variants ignore the locale |
320
400
 
321
401
  ### `Array`
322
402
 
323
- | API | Status | Probe | Notes |
324
- | --------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------- | ----------------------------------- |
325
- | `push` / `pop` | ✅ | [lib-array-push-pop.ts](conformance/lib-array-push-pop.ts) | Basic stack operations |
326
- | `shift` / `unshift` | ✅ | [lib-array-shift-unshift.ts](conformance/lib-array-shift-unshift.ts) | Queue operations |
327
- | `join` / `reverse` | ✅ | [lib-array-reverse-join.ts](conformance/lib-array-reverse-join.ts) | `join()` defaults to `","`; `reverse` reverses in place and returns the array |
328
- | `slice` | ✅ | [lib-array-slice.ts](conformance/lib-array-slice.ts) | Negative indices count from the end |
329
- | `splice` | ✅ | [lib-array-splice.ts](conformance/lib-array-splice.ts) | Removes and returns elements in place, inserting extra arguments |
330
- | `sort` (default, lexicographic) | ✅ | [semantics-default-sort.ts](conformance/semantics-default-sort.ts) | String sort by default |
331
- | `sort` (comparator) | ✅ | [lib-array-sort-comparator.ts](conformance/lib-array-sort-comparator.ts) | Comparator lowered into `sort.SliceStable` |
332
- | `flat` / `flatMap` | ✅ | [lib-array-flat-flatmap.ts](conformance/lib-array-flat-flatmap.ts) | One-level `flat`; `flatMap` appends callback results |
333
- | `at` | ✅ | [lib-array-at.ts](conformance/lib-array-at.ts) | Supports negative indices |
334
- | `fill` | ✅ | [lib-array-fill.ts](conformance/lib-array-fill.ts) | `new Array<T>(n)` → `make([]T, n)`; `fill` assigns in place |
335
- | `Array.from` | ✅ | [lib-array-from.ts](conformance/lib-array-from.ts) | Array-likes read `length`; the callback gets the index |
336
- | `Array.isArray` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Type check on values |
337
- | `map` / `filter` / `reduce` | ✅ | [lib-array-map-filter-reduce.ts](conformance/lib-array-map-filter-reduce.ts) | Incl. chaining and object arrays |
338
- | `some` / `every` | ✅ | [lib-array-some-every.ts](conformance/lib-array-some-every.ts) | Predicate quantifiers |
339
- | `find` / `findIndex` / `findLast` / `findLastIndex` | ✅ | [lib-array-find.ts](conformance/lib-array-find.ts) | `findLast`/`findLastIndex` search from the end |
340
- | `forEach` | ✅ | [lib-map-iteration.ts](conformance/lib-map-iteration.ts) | Block-body callbacks; `Map.forEach` |
341
- | `includes` / `indexOf` / `lastIndexOf` | ✅ | [lib-array-search.ts](conformance/lib-array-search.ts) | `lastIndexOf` searches from the end |
342
- | `entries` / `keys` / `values` | ✅ | [lib-array-entries.ts](conformance/lib-array-entries.ts) | `[index, value]` pairs destructured in `for...of` |
343
- | `length` truncation (`arr.length = 0`) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Clear via length assignment |
344
- | `filter(Boolean)` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Constructor as predicate |
345
- | `concat` | ✅ | [lib-array-concat.ts](conformance/lib-array-concat.ts) | Arrays flattened one level, values appended |
346
- | `reduceRight` | ✅ | [lib-array-reduce-right.ts](conformance/lib-array-reduce-right.ts) | `reduce` over a reversed copy |
347
- | `copyWithin` | ✅ | [lib-array-copy-within.ts](conformance/lib-array-copy-within.ts) | Go `copy` (overlap-safe) |
348
- | Change-preserving copies (`toSorted` / `toReversed` / `with`) | ✅ | [lib-array-copies.ts](conformance/lib-array-copies.ts) | Clone, then sort / reverse / set |
349
- | `toSpliced` | ✅ | [lib-array-to-spliced.ts](conformance/lib-array-to-spliced.ts) | `slices.Concat` of the kept parts |
403
+ | API | Status | Probe | Notes |
404
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
405
+ | `push` / `pop` | ✅ | [lib-array-push-pop.ts](conformance/lib-array-push-pop.ts) | Basic stack operations |
406
+ | `shift` / `unshift` | ✅ | [lib-array-shift-unshift.ts](conformance/lib-array-shift-unshift.ts) | Queue operations |
407
+ | `join` / `reverse` | ✅ | [lib-array-reverse-join.ts](conformance/lib-array-reverse-join.ts) | `join()` defaults to `","`; `reverse` reverses in place and returns the array |
408
+ | `toString()` / `String(arr)` / `` `${arr}` `` | ✅ | [syntax-array-to-string.ts](conformance/syntax-array-to-string.ts) | Elements joined with `,` (nested arrays flatten) |
409
+ | `slice` | ✅ | [lib-array-slice.ts](conformance/lib-array-slice.ts) | Negative indices count from the end |
410
+ | `splice` | ✅ | [lib-array-splice.ts](conformance/lib-array-splice.ts) | Removes and returns elements in place, inserting extra arguments |
411
+ | `sort` (default, lexicographic) | ✅ | [semantics-default-sort.ts](conformance/semantics-default-sort.ts) | String sort by default |
412
+ | `sort` (comparator) | ✅ | [lib-array-sort-comparator.ts](conformance/lib-array-sort-comparator.ts) | Comparator lowered into `sort.SliceStable` |
413
+ | `flat` / `flatMap` | ✅ | [lib-array-flat-flatmap.ts](conformance/lib-array-flat-flatmap.ts) | One-level `flat`; `flatMap` appends callback results |
414
+ | `at` | ✅ | [lib-array-at.ts](conformance/lib-array-at.ts) | Supports negative indices |
415
+ | `fill` | ✅ | [lib-array-fill.ts](conformance/lib-array-fill.ts) | `new Array<T>(n)` → `make([]T, n)`; `fill` assigns in place |
416
+ | `Array.from` | ✅ | [lib-array-from.ts](conformance/lib-array-from.ts) | Array-likes read `length`; the callback gets the index |
417
+ | `Array.isArray` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Type check on values |
418
+ | `map` / `filter` / `reduce` | ✅ | [lib-array-map-filter-reduce.ts](conformance/lib-array-map-filter-reduce.ts) | Incl. chaining and object arrays |
419
+ | `some` / `every` | ✅ | [lib-array-some-every.ts](conformance/lib-array-some-every.ts) | Predicate quantifiers |
420
+ | `find` / `findIndex` / `findLast` / `findLastIndex` | ✅ | [lib-array-find.ts](conformance/lib-array-find.ts) | `findLast`/`findLastIndex` search from the end |
421
+ | `forEach` | ✅ | [lib-map-iteration.ts](conformance/lib-map-iteration.ts) | Block-body callbacks; `Map.forEach` |
422
+ | `includes` / `indexOf` / `lastIndexOf` | ✅ | [lib-array-search.ts](conformance/lib-array-search.ts) | `lastIndexOf` searches from the end |
423
+ | `entries` / `keys` / `values` | ✅ | [lib-array-entries.ts](conformance/lib-array-entries.ts) | `[index, value]` pairs destructured in `for...of` |
424
+ | `length` truncation (`arr.length = 0`) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Clear via length assignment |
425
+ | `filter(Boolean)` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Constructor as predicate |
426
+ | `concat` | ✅ | [lib-array-concat.ts](conformance/lib-array-concat.ts) | Arrays flattened one level, values appended |
427
+ | `reduceRight` | ✅ | [lib-array-reduce-right.ts](conformance/lib-array-reduce-right.ts) | `reduce` over a reversed copy |
428
+ | `copyWithin` | ✅ | [lib-array-copy-within.ts](conformance/lib-array-copy-within.ts) | Go `copy` (overlap-safe) |
429
+ | Change-preserving copies (`toSorted` / `toReversed` / `with`) | ✅ | [lib-array-copies.ts](conformance/lib-array-copies.ts) | Clone, then sort / reverse / set |
430
+ | `toSpliced` | ✅ | [lib-array-to-spliced.ts](conformance/lib-array-to-spliced.ts) | `slices.Concat` of the kept parts |
431
+ | `Array.of` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | |
432
+ | Iterator helpers on generators (`map` / `filter` / `flatMap` / `take` / `drop` / `toArray` / `forEach` / `some` / `every` / `find` / `reduce`), `Iterator.from(array)` | ✅ | [lib-iterator-helpers.ts](conformance/lib-iterator-helpers.ts) | Lazy (works on infinite generators): one goroutine per stage |
433
+ | `Array.fromAsync` | ❌ | — | Not declared |
434
+ | `[...map.keys()]` / `[...map.values()]` | ✅ | [lib-group-by.ts](conformance/lib-group-by.ts) | |
350
435
 
351
436
  ### `Map` / `Set`
352
437
 
353
- | API | Status | Probe | Notes |
354
- | -------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ------------------------------------------------------- |
355
- | `Map` (`set` / `get` / `has` / `delete` / `size`) | ✅ | [lib-map.ts](conformance/lib-map.ts) | `Map<K, V>` → Go `map[K]V`; constructor with entries |
356
- | `Map` iteration (`for...of`, destructuring) | ✅ | [lib-map-iteration.ts](conformance/lib-map-iteration.ts) | Key/value iteration, `Object.entries()` unwrapping |
357
- | `Set` (`add` / `has` / `delete` / `size`) | ✅ | [lib-set.ts](conformance/lib-set.ts) | `Set<T>` → Go `map[T]struct{}`; constructor with values |
358
- | `Set` iteration / spread | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | `for...of`, `[...set]` |
359
- | `Map.clear` / `Set.clear` | ✅ | [lib-map-clear.ts](conformance/lib-map-clear.ts) | `TnMap.Clear()` |
360
- | `WeakMap` / `WeakSet` | ✅ | [lib-weak-collections.ts](conformance/lib-weak-collections.ts) | Same as `Map` / `Set` (weakness is not observable) |
361
- | Set operations (`union` / `intersection` / `difference`) | ✅ | [lib-set-operations.ts](conformance/lib-set-operations.ts) | Plus `symmetricDifference` / `isSubsetOf` / `isSupersetOf` / `isDisjointFrom` |
438
+ | API | Status | Probe | Notes |
439
+ | -------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ----------------------------------------------------------------------------- |
440
+ | `Map` (`set` / `get` / `has` / `delete` / `size`) | ✅ | [lib-map.ts](conformance/lib-map.ts) | `Map<K, V>` → Go `map[K]V`; constructor with entries |
441
+ | `Map` iteration (`for...of`, destructuring) | ✅ | [lib-map-iteration.ts](conformance/lib-map-iteration.ts) | Key/value iteration, `Object.entries()` unwrapping |
442
+ | `Set` (`add` / `has` / `delete` / `size`) | ✅ | [lib-set.ts](conformance/lib-set.ts) | `Set<T>` → Go `map[T]struct{}`; constructor with values |
443
+ | `Set` iteration / spread | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | `for...of`, `[...set]` |
444
+ | `Map.clear` / `Set.clear` | ✅ | [lib-map-clear.ts](conformance/lib-map-clear.ts) | `TnMap.Clear()` |
445
+ | `WeakMap` / `WeakSet` | ✅ | [lib-weak-collections.ts](conformance/lib-weak-collections.ts) | Same as `Map` / `Set` (weakness is not observable) |
446
+ | Set operations (`union` / `intersection` / `difference`) | ✅ | [lib-set-operations.ts](conformance/lib-set-operations.ts) | Plus `symmetricDifference` / `isSubsetOf` / `isSupersetOf` / `isDisjointFrom` |
362
447
 
363
448
  ### `Number`
364
449
 
365
- | API | Status | Probe | Notes |
366
- | ------------------------------------------------- | :----: | -------------------------------------------------------- | -------------------------------------------------------- |
367
- | `toString` (incl. radix) | ✅ | [lib-number-format.ts](conformance/lib-number-format.ts) | Universal `toString()` via `fmt.Sprintf` for any type |
368
- | `toFixed` | ✅ | [lib-number-format.ts](conformance/lib-number-format.ts) | `n.toFixed(2)` via `strconv.FormatFloat` |
369
- | `parseInt` / `parseFloat` / `Number()` | ✅ | [lib-number-parse.ts](conformance/lib-number-parse.ts) | Mapped to Go's `strconv` package |
370
- | `Number.isInteger` / `isNaN` / `MAX_SAFE_INTEGER` | ✅ | [lib-number-checks.ts](conformance/lib-number-checks.ts) | Number predicates and constants |
371
- | `Number.EPSILON` / `isFinite` / `toPrecision` | ✅ | [lib-number-misc.ts](conformance/lib-number-misc.ts) | `toPrecision` → `strconv.FormatFloat(x, 'g', n, 64)` |
372
- | `String()` / `Boolean()` conversions | ✅ | [lib-conversions.ts](conformance/lib-conversions.ts) | JS formatting / truthiness |
450
+ | API | Status | Probe | Notes |
451
+ | -------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | ----------------------------------------------------- |
452
+ | `toString` (incl. radix) | ✅ | [lib-number-format.ts](conformance/lib-number-format.ts) | Universal `toString()` via `fmt.Sprintf` for any type |
453
+ | `toFixed` | ✅ | [lib-number-format.ts](conformance/lib-number-format.ts) | `n.toFixed(2)` via `strconv.FormatFloat` |
454
+ | `parseInt` / `parseFloat` / `Number()` | ✅ | [lib-number-parse.ts](conformance/lib-number-parse.ts) | Mapped to Go's `strconv` package |
455
+ | `Number.isInteger` / `isNaN` / `MAX_SAFE_INTEGER` | ✅ | [lib-number-checks.ts](conformance/lib-number-checks.ts) | Number predicates and constants |
456
+ | `Number.MIN_SAFE_INTEGER` / `MAX_VALUE` | ✅ | — | |
457
+ | `Number.EPSILON` / `isFinite` / `toPrecision` | ✅ | [lib-number-misc.ts](conformance/lib-number-misc.ts) | `toPrecision` → `strconv.FormatFloat(x, 'g', n, 64)` |
458
+ | `String()` / `Boolean()` conversions | ✅ | [lib-conversions.ts](conformance/lib-conversions.ts) | JS formatting / truthiness |
459
+ | `toExponential` / `Number.isSafeInteger` / `parseInt` / `parseFloat` / `MIN_VALUE` / `NEGATIVE_INFINITY` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | |
460
+ | Number `toLocaleString` | ❌ | — | Needs `Intl` |
373
461
 
374
462
  ### `Date`
375
463
 
376
- | API | Status | Probe | Notes |
377
- | ------------------------------------------------ | :----: | ---------------------------------------------- | ----------------------------- |
378
- | `new Date()` / `getTime` / `toISOString` | ✅ | [lib-date.ts](conformance/lib-date.ts) | `new Date(ms)` → `time.UnixMilli`; `getTime`/`toISOString` mapped to `time.Time` |
379
- | `Date.now()` | ✅ | [lib-date-now.ts](conformance/lib-date-now.ts) | `time.Now().UnixMilli()` |
380
- | Component getters (`getFullYear`, `getMonth`, …) | ✅ | [lib-date-getters.ts](conformance/lib-date-getters.ts) | Local and `getUTC*` getters, `Date.UTC` |
464
+ | API | Status | Probe | Notes |
465
+ | ----------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
466
+ | `new Date()` / `getTime` / `toISOString` | ✅ | [lib-date.ts](conformance/lib-date.ts) | `new Date(ms)` → `time.UnixMilli`; `getTime`/`toISOString` mapped to `time.Time` |
467
+ | `Date.now()` | ✅ | [lib-date-now.ts](conformance/lib-date-now.ts) | `time.Now().UnixMilli()` |
468
+ | Component getters (`getFullYear`, `getMonth`, …) | ✅ | [lib-date-getters.ts](conformance/lib-date-getters.ts) | Local and `getUTC*` getters, `Date.UTC` |
469
+ | `toJSON` / `valueOf`; Invalid Dates (`getTime()` is `NaN`, `toISOString` throws a `RangeError`) | ✅ | [lib-date-parse-set.ts](conformance/lib-date-parse-set.ts) | |
470
+ | `toString` / `toDateString` / `toTimeString` / `toUTCString`, `String(date)`, `` `${date}` `` | ✅ | [lib-date-parse-set.ts](conformance/lib-date-parse-set.ts) | Node's formats in the local zone; long zone names for common zones (`Coordinated Universal Time`, `Central European Standard Time`, …), `GMT±hh:mm` otherwise |
471
+ | `new Date(string)` / `new Date(y, m, d, …)` / `new Date(date)` / `Date.parse` | ✅ | [lib-date-parse-set.ts](conformance/lib-date-parse-set.ts) | ISO strings (date-only UTC, date-times local unless offset) and the formats `toString` / `toUTCString` / common `Month D, YYYY` and `YYYY/MM/DD` forms produce; an unparsable string is an Invalid Date |
472
+ | Setters (`setFullYear`, `setDate`, `setHours`, … and `setUTC*`), `setTime`, `getTimezoneOffset` | ✅ | [lib-date-parse-set.ts](conformance/lib-date-parse-set.ts) | Fields overflow like JS. Dates are values: a setter updates the variable or field it is called on, not other references to the same Date |
473
+ | `toLocaleDateString` / `toLocaleTimeString` / `toLocaleString` | ✅ | [lib-date-parse-set.ts](conformance/lib-date-parse-set.ts) | `en-US` format; locales and options are ignored |
474
+ | Date arithmetic and ordering (`b - a`, `+d`, `a < b`) | ✅ | [semantics-date-arithmetic.ts](conformance/semantics-date-arithmetic.ts) | The time value in milliseconds; `any` operands of `-` `*` `/` `%` convert with ToNumber |
381
475
 
382
476
  ### `RegExp`
383
477
 
384
- | API | Status | Probe | Notes |
385
- | ------------------------------------------------------ | :----: | -------------------------------------------------------------------- | --------------------------------------------------- |
386
- | Regex literals | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | `/pattern/flags` transpiled to `regexp.MustCompile` |
387
- | `new RegExp()` | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | Constructor with optional flags |
388
- | `test()` | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | Mapped to `regexp.MatchString` |
389
- | `exec()` (groups) | ✅ | [lib-regex-groups.ts](conformance/lib-regex-groups.ts) | Mapped to `regexp.FindStringSubmatch` |
390
- | Flags (`i`, `m`) | ✅ | [lib-regex-flags.ts](conformance/lib-regex-flags.ts) | Case-insensitive, multiline |
391
- | Backreferences | ✅ | [lib-regex-backreference.ts](conformance/lib-regex-backreference.ts) | Backreference patterns run on a small backtracking engine |
392
- | Named groups | ✅ | [lib-regex-named-groups.ts](conformance/lib-regex-named-groups.ts) | `(?<name>` → `(?P<name>`; `exec` returns a match with `.groups` |
393
- | Global `exec` loop (`/g` + `lastIndex`) | ✅ | [lib-regex-global-exec.ts](conformance/lib-regex-global-exec.ts) | /g regexes carry `lastIndex` state in the `TnRegex` wrapper |
394
- | Lookbehind | ✅ | [lib-regex-lookbehind.ts](conformance/lib-regex-lookbehind.ts) | Lookaround patterns run on the backtracking engine |
395
- | Remaining flags (`s` / `u` / `y`) & `source` / `flags` | ✅ | [lib-regex-more-flags.ts](conformance/lib-regex-more-flags.ts) | Sticky matching, `\u{…}` escapes, `lastIndex` / `source` / `flags` / flag getters |
396
- | `split` with RegExp | ✅ | [lib-regex-split.ts](conformance/lib-regex-split.ts) | `re.Split(s, -1)` |
478
+ | API | Status | Probe | Notes |
479
+ | ----------------------------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
480
+ | Regex literals | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | `/pattern/flags` transpiled to `regexp.MustCompile` |
481
+ | `new RegExp()` | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | Constructor with optional flags |
482
+ | `test()` | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | Mapped to `regexp.MatchString` |
483
+ | `exec()` (groups) | ✅ | [lib-regex-groups.ts](conformance/lib-regex-groups.ts) | Mapped to `regexp.FindStringSubmatch` |
484
+ | Flags (`i`, `m`) | ✅ | [lib-regex-flags.ts](conformance/lib-regex-flags.ts) | Case-insensitive, multiline |
485
+ | Backreferences | ✅ | [lib-regex-backreference.ts](conformance/lib-regex-backreference.ts) | Backreference patterns run on a small backtracking engine |
486
+ | Named groups | ✅ | [lib-regex-named-groups.ts](conformance/lib-regex-named-groups.ts) | `(?<name>` → `(?P<name>`; `exec` returns a match with `.groups` |
487
+ | Global `exec` loop (`/g` + `lastIndex`) | ✅ | [lib-regex-global-exec.ts](conformance/lib-regex-global-exec.ts) | /g regexes carry `lastIndex` state in the `TnRegex` wrapper |
488
+ | Lookbehind | ✅ | [lib-regex-lookbehind.ts](conformance/lib-regex-lookbehind.ts) | Lookaround patterns run on the backtracking engine |
489
+ | Remaining flags (`s` / `u` / `y`) & `source` / `flags` | ✅ | [lib-regex-more-flags.ts](conformance/lib-regex-more-flags.ts) | Sticky matching, `\u{…}` escapes, `lastIndex` / `source` / `flags` / flag getters |
490
+ | `split` with RegExp | ✅ | [lib-regex-split.ts](conformance/lib-regex-split.ts) | JS semantics: captures are included, `limit` counts items |
491
+ | Match `.index` (`exec` / `match` / `matchAll`), `match` with `/g` | ✅ | [lib-regex-index-split.ts](conformance/lib-regex-index-split.ts) | Character index kept in a hidden slot of the match array; `search` counts characters |
492
+ | Unicode property escapes (`\p{L}`) with `u` | ✅ | — | Go's `regexp` |
493
+ | `\p{…}` in patterns that need the backtracking engine (backreferences, lookaround); `d` flag (`indices`); `v` flag; `RegExp.escape` | ❌ | — | The backtracking engine has no `\p`: `/(\p{L})\1/u` doesn't match `aa` (wrong result, no error) |
397
494
 
398
495
  ### `Promise` / timers
399
496
 
400
- | API | Status | Probe | Notes |
401
- | ---------------------------------------------------- | :----: | ------------------------------------------------------------ | ------------------------------------------------------------------- |
402
- | `Promise` constructor / `.then` | ✅ | [syntax-promise-then.ts](conformance/syntax-promise-then.ts) | Channel lowering works (see [Async & timing](#async--timing)) |
403
- | `resolve` / `reject` passed as values | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | `new Promise((resolve) => setTimeout(resolve, ms))` |
404
- | `Promise.all` | ✅ | [syntax-promise-all.ts](conformance/syntax-promise-all.ts) | Channel lowering works (see [Async & timing](#async--timing)) |
405
- | `Promise.resolve` | ✅ | [lib-promise-resolve.ts](conformance/lib-promise-resolve.ts) | Buffered channel holding the value |
406
- | `Promise.reject` / `.catch` / `.finally` | ✅ | [lib-promise-catch.ts](conformance/lib-promise-catch.ts) | Rejected promises are closed channels with a reason; `await` rethrows |
407
- | `Promise.race` / `allSettled` / `any` | ✅ | [lib-promise-combinators.ts](conformance/lib-promise-combinators.ts) | Goroutine per promise; first settled / all settled / first fulfilled |
408
- | `clearTimeout` | ✅ | [lib-timers.ts](conformance/lib-timers.ts) | `TnClearTimeout` stops the timer |
409
- | `setInterval` / `clearInterval` | ✅ | [lib-set-interval.ts](conformance/lib-set-interval.ts) | `time.Ticker`; the process lives until cleared |
410
- | `queueMicrotask` | ✅ | [lib-queue-microtask.ts](conformance/lib-queue-microtask.ts) | Runs after the current synchronous code (end of main or a timer callback) |
411
- | `setTimeout` | ✅ | [lib-set-timeout.ts](conformance/lib-set-timeout.ts) | Lowered to `time.AfterFunc` (see [Async & timing](#async--timing)) |
497
+ See [Async & timing](#async--timing): `Promise` (constructor, `.then` / `.catch` / `.finally`,
498
+ `resolve` / `reject` / `all` / `race` / `allSettled` / `any`), `setTimeout`, `setInterval`,
499
+ `queueMicrotask` and their `clear*` functions, plus the gaps.
412
500
 
413
501
  ### Misc globals
414
502
 
415
- | API | Status | Probe | Notes |
416
- | ------------------------------------------- | :----: | ------------------------------------------------------------------ | ---------------------------------------- |
417
- | `assert` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | Transpiled to `panic` on failure |
418
- | `process.argv` / `process.platform` | ✅ | [lib-process.ts](conformance/lib-process.ts) | Node's shapes (`[execPath, script, ...args]`, `win32`); the rest of `process` is in [node:process](#nodeprocess) |
419
- | `process.env` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Environment variable access |
420
- | `process.exit` | ✅ | [lib-process-exit.ts](conformance/lib-process-exit.ts) | `os.Exit`, after `process.on('exit')` listeners |
421
- | `process.cwd()` | ✅ | [lib-process-cwd.ts](conformance/lib-process-cwd.ts) | `os.Getwd()` |
422
- | `Buffer` / `Uint8Array` / `TextEncoder` / `TextDecoder` / `atob` / `btoa` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | See [node:buffer](#nodebuffer) |
423
- | `URL` / `URLSearchParams` | ✅ | [lib-node-url-class.ts](conformance/lib-node-url-class.ts) | See [node:url](#nodeurl) |
424
- | `EventTarget` / `Event` / `AbortController` / `AbortSignal` | ✅ | [lib-node-abort.ts](conformance/lib-node-abort.ts) | See [node:events](#nodeevents) |
425
- | `performance` / `setImmediate` / `crypto` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | See [perf_hooks](#nodeperf_hooks), [timers](#nodetimers), [crypto](#nodecrypto) |
426
- | `TypeError` / `RangeError` / `SyntaxError` & co. | ✅ | [lib-node-assert.ts](conformance/lib-node-assert.ts) | `TnError`s carrying their `name`; `instanceof` checks the name |
427
- | `Infinity` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.Inf(1)` |
428
- | Global `isNaN` / `isFinite` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.IsNaN` / `math.IsInf` |
429
- | `encodeURIComponent` / `decodeURIComponent` | ✅ | [lib-uri.ts](conformance/lib-uri.ts) | `TnEncodeURIComponent` / `url.PathUnescape` |
430
- | `structuredClone` | ✅ | [lib-structured-clone.ts](conformance/lib-structured-clone.ts) | Reflection deep copy |
431
- | `fetch` / `Headers` / `Request` / `Response` | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | See [fetch](#fetch) |
432
- | `ReadableStream` / `WritableStream` / `TransformStream` & co., `TextEncoderStream` / `TextDecoderStream`, `CompressionStream` / `DecompressionStream` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | See [stream/web](#nodestreamweb) |
433
- | `Blob` / `File` / `FormData` | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts) | See [buffer](#nodebuffer) and [fetch](#fetch) |
434
- | `MessageChannel` / `MessagePort` / `BroadcastChannel` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | See [worker_threads](#nodeworker_threads) |
435
- | `__filename` / `__dirname` | ✅ | — | The running executable (a native binary has no script file) |
436
- | `globalThis` | ✅ | [lib-global-this.ts](conformance/lib-global-this.ts) | `globalThis.x` is the global `x`; `(globalThis as any)` is a dynamic object |
503
+ | API | Status | Probe | Notes |
504
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
505
+ | `assert` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | Transpiled to `panic` on failure |
506
+ | `process.argv` / `process.platform` | ✅ | [lib-process.ts](conformance/lib-process.ts) | Node's shapes (`[execPath, script, ...args]`, `win32`); the rest of `process` is in [node:process](#nodeprocess) |
507
+ | `process.env` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Environment variable access |
508
+ | `process.exit` | ✅ | [lib-process-exit.ts](conformance/lib-process-exit.ts) | `os.Exit`, after `process.on('exit')` listeners |
509
+ | `process.cwd()` | ✅ | [lib-process-cwd.ts](conformance/lib-process-cwd.ts) | `os.Getwd()` |
510
+ | `Buffer` / `Uint8Array` / `TextEncoder` / `TextDecoder` / `atob` / `btoa` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | See [node:buffer](#nodebuffer) |
511
+ | `URL` / `URLSearchParams` | ✅ | [lib-node-url-class.ts](conformance/lib-node-url-class.ts) | See [node:url](#nodeurl) |
512
+ | `EventTarget` / `Event` / `AbortController` / `AbortSignal` | ✅ | [lib-node-abort.ts](conformance/lib-node-abort.ts) | See [node:events](#nodeevents) |
513
+ | `performance` / `setImmediate` / `crypto` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | See [perf_hooks](#nodeperf_hooks), [timers](#nodetimers), [crypto](#nodecrypto) |
514
+ | `TypeError` / `RangeError` / `SyntaxError` & co. | ✅ | [lib-node-assert.ts](conformance/lib-node-assert.ts) | `TnError`s carrying their `name`; `instanceof` checks the name |
515
+ | `Infinity` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.Inf(1)` |
516
+ | Global `isNaN` / `isFinite` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.IsNaN` / `math.IsInf` |
517
+ | `encodeURIComponent` / `decodeURIComponent` | ✅ | [lib-uri.ts](conformance/lib-uri.ts) | `TnEncodeURIComponent` / `url.PathUnescape` |
518
+ | `structuredClone` | ✅ | [lib-structured-clone.ts](conformance/lib-structured-clone.ts) | Reflection deep copy |
519
+ | `fetch` / `Headers` / `Request` / `Response` | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | See [fetch](#fetch) |
520
+ | `ReadableStream` / `WritableStream` / `TransformStream` & co., `TextEncoderStream` / `TextDecoderStream`, `CompressionStream` / `DecompressionStream` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | See [stream/web](#nodestreamweb) |
521
+ | `Blob` / `File` / `FormData` | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts) | See [buffer](#nodebuffer) and [fetch](#fetch) |
522
+ | `MessageChannel` / `MessagePort` / `BroadcastChannel` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | See [worker_threads](#nodeworker_threads) |
523
+ | `__filename` / `__dirname` | ✅ | — | The running executable (a native binary has no script file) |
524
+ | `globalThis` | ✅ | [lib-global-this.ts](conformance/lib-global-this.ts) | `globalThis.x` is the global `x`; `(globalThis as any)` is a dynamic object |
525
+ | `err.stack` | ✅ | [lib-error-stack.ts](conformance/lib-error-stack.ts) | `Name: message` and an `at fn (file.ts:line)` line per TS frame (no columns), from `runtime.Callers` and the `//line` directives |
526
+ | `AggregateError` (`errors`) | ✅ | [lib-error-stack.ts](conformance/lib-error-stack.ts) | |
527
+ | `Error.captureStackTrace` / `Error.isError` / `DOMException` | ❌ | — | Not declared |
528
+ | `Symbol.for` / `Symbol.keyFor` / `description` | ✅ | [lib-builtins-statics.ts](conformance/lib-builtins-statics.ts) | A global registry by key |
529
+ | `[Symbol.asyncIterator]()` methods; `Symbol.toPrimitive` / `hasInstance` / `toStringTag` | ❌ | — | Only `Symbol()`, `Symbol.iterator` and `Symbol.dispose` are lowered |
530
+ | `WeakRef` / `FinalizationRegistry` | ✅ | [lib-weak-refs.ts](conformance/lib-weak-refs.ts) | Go's `weak` package and `runtime.AddCleanup`; cleanup callbacks run on the event loop. Targets must be objects (pointers) |
531
+ | `Reflect` (`ownKeys` / `has` / `get` / `set` / …) | ❌ | — | Feasible over the existing dynamic property access |
532
+ | `Proxy` | 🚫 | — | Intercepting every property access on static Go structs; a `Proxy` limited to dynamic (`any`) objects would be feasible |
533
+ | `Intl` (`NumberFormat`, `DateTimeFormat`, `Collator`, `PluralRules`, `ListFormat`, `RelativeTimeFormat`, `Segmenter`), `toLocaleString` | ❌ | — | Needs locale data (vendored `golang.org/x/text`, or hand-written `en-US` first) |
534
+ | `Temporal` | ❌ | — | Feasible on Go's `time` and tzdata |
535
+ | `WebSocket` / `navigator` / `CustomEvent` / `URLPattern` / `EventSource` / `reportError` | ❌ | — | Not declared |
536
+ | `WebAssembly` | ❌ | — | Needs a Wasm runtime: vendoring wazero (pure Go, no cgo) would provide one (see [wasi](#nodewasi)) |
437
537
 
438
538
  ### Node builtins (`node:*`)
439
539
 
@@ -444,392 +544,410 @@ named, default or namespace imports; subpaths (`fs/promises`, `path/posix`,
444
544
  completions and events run on one event loop, one at a time, as in Node; an
445
545
  async function runs synchronously until its first `await`.
446
546
 
447
- | Module | Status | Section |
448
- | ------------------------------------------- | :----: | ---------------------------------------------------------- |
449
- | `node:assert` / `node:assert/strict` | ✅ | [assert](#nodeassert) |
450
- | `node:async_hooks` | ✅ | [async_hooks](#nodeasync_hooks) |
451
- | `node:buffer` (+ globals `Buffer`, `Uint8Array`, `atob`, `btoa`, `Blob`, `File`) | ✅ | [buffer](#nodebuffer) |
452
- | `node:child_process` | ✅ | [child_process](#nodechild_process) |
453
- | `node:cluster` | ✅ | [cluster](#nodecluster) |
454
- | `node:console` | ✅ | [console](#nodeconsole) |
455
- | `node:constants` | ✅ | [constants](#nodeconstants--nodesys) |
456
- | `node:crypto` (+ global `crypto`) | ✅ | [crypto](#nodecrypto) |
457
- | `node:dgram` | ✅ | [dgram](#nodedgram) |
458
- | `node:diagnostics_channel` | ✅ | [diagnostics_channel](#nodediagnostics_channel) |
459
- | `node:dns` / `node:dns/promises` | ✅ | [dns](#nodedns) |
460
- | `node:domain` | ❌ | [domain](#nodedomain) |
461
- | `node:events` (+ `EventTarget`, `AbortController`) | ✅ | [events](#nodeevents) |
462
- | `node:fs` / `node:fs/promises` | ✅ | [fs](#nodefs) |
463
- | `node:http` / `node:https` | ✅ | [http / https](#nodehttp--nodehttps) |
464
- | `node:http2` | ✅ | [http2](#nodehttp2) |
465
- | `node:inspector` | ❌ | [inspector](#nodeinspector) |
466
- | `node:module` | ❌ | [module](#nodemodule) |
467
- | `node:net` | ✅ | [net](#nodenet) |
468
- | `node:os` | ✅ | [os](#nodeos) |
469
- | `node:path` / `path/posix` / `path/win32` | ✅ | [path](#nodepath) |
470
- | `node:perf_hooks` (+ global `performance`) | ✅ | [perf_hooks](#nodeperf_hooks) |
471
- | `node:process` (+ global `process`) | ✅ | [process](#nodeprocess) |
472
- | `node:punycode` | ✅ | [punycode](#nodepunycode) |
473
- | `node:querystring` | ✅ | [querystring](#nodequerystring) |
474
- | `node:readline` / `node:readline/promises` | ✅ | [readline](#nodereadline) |
475
- | `node:repl` | ❌ | [repl](#noderepl) |
476
- | `node:sea` | ❌ | [sea](#nodesea) |
477
- | `node:sqlite` | ✅ | [sqlite](#nodesqlite) |
478
- | `node:stream` / `stream/promises` / `stream/consumers` | ✅ | [stream](#nodestream) |
479
- | `node:stream/web` (+ globals `ReadableStream`, `WritableStream`, `TransformStream`, …) | ✅ | [stream/web](#nodestreamweb) |
480
- | `node:string_decoder` | ✅ | [string_decoder](#nodestring_decoder) |
481
- | `node:sys` | ✅ | [constants / sys](#nodeconstants--nodesys) |
482
- | `node:test` | ✅ | [test](#nodetest) |
483
- | `node:test/reporters` | ❌ | [test/reporters](#nodetestreporters) |
484
- | `node:timers` / `node:timers/promises` | ✅ | [timers](#nodetimers) |
485
- | `node:tls` | ✅ | [tls](#nodetls) |
486
- | `node:trace_events` | ❌ | [trace_events](#nodetrace_events) |
487
- | `node:tty` | ✅ | [tty](#nodetty) |
488
- | `node:url` (+ globals `URL`, `URLSearchParams`) | ✅ | [url](#nodeurl) |
489
- | `node:util` / `node:util/types` | ✅ | [util](#nodeutil) |
490
- | `node:v8` | ❌ | [v8](#nodev8) |
491
- | `node:vm` | ❌ | [vm](#nodevm) |
492
- | `node:wasi` | ❌ | [wasi](#nodewasi) |
493
- | `node:worker_threads` (+ globals `MessageChannel`, `MessagePort`, `BroadcastChannel`) | ✅ | [worker_threads](#nodeworker_threads) |
494
- | `node:zlib` | ✅ | [zlib](#nodezlib) |
495
- | Global `fetch` (+ `Headers`, `Request`, `Response`, `FormData`) | ✅ | [fetch](#fetch) |
547
+ | Module | Status | Section |
548
+ | -------------------------------------------------------------------------------------- | :----: | ----------------------------------------------- |
549
+ | `node:assert` / `node:assert/strict` | ✅ | [assert](#nodeassert) |
550
+ | `node:async_hooks` | ✅ | [async_hooks](#nodeasync_hooks) |
551
+ | `node:buffer` (+ globals `Buffer`, `Uint8Array`, `atob`, `btoa`, `Blob`, `File`) | ✅ | [buffer](#nodebuffer) |
552
+ | `node:child_process` | ✅ | [child_process](#nodechild_process) |
553
+ | `node:cluster` | ✅ | [cluster](#nodecluster) |
554
+ | `node:console` | ✅ | [console](#nodeconsole) |
555
+ | `node:constants` | ✅ | [constants](#nodeconstants--nodesys) |
556
+ | `node:crypto` (+ global `crypto`) | ✅ | [crypto](#nodecrypto) |
557
+ | `node:dgram` | ✅ | [dgram](#nodedgram) |
558
+ | `node:diagnostics_channel` | ✅ | [diagnostics_channel](#nodediagnostics_channel) |
559
+ | `node:dns` / `node:dns/promises` | ✅ | [dns](#nodedns) |
560
+ | `node:domain` | 🚫 | [domain](#nodedomain) |
561
+ | `node:events` (+ `EventTarget`, `AbortController`) | ✅ | [events](#nodeevents) |
562
+ | `node:fs` / `node:fs/promises` | ✅ | [fs](#nodefs) |
563
+ | `node:http` / `node:https` | ✅ | [http / https](#nodehttp--nodehttps) |
564
+ | `node:http2` | ✅ | [http2](#nodehttp2) |
565
+ | `node:inspector` | 🚫 | [inspector](#nodeinspector) |
566
+ | `node:module` | ✅ | [module](#nodemodule) |
567
+ | `node:net` | ✅ | [net](#nodenet) |
568
+ | `node:os` | ✅ | [os](#nodeos) |
569
+ | `node:path` / `path/posix` / `path/win32` | ✅ | [path](#nodepath) |
570
+ | `node:perf_hooks` (+ global `performance`) | ✅ | [perf_hooks](#nodeperf_hooks) |
571
+ | `node:process` (+ global `process`) | ✅ | [process](#nodeprocess) |
572
+ | `node:punycode` | ✅ | [punycode](#nodepunycode) |
573
+ | `node:querystring` | ✅ | [querystring](#nodequerystring) |
574
+ | `node:readline` / `node:readline/promises` | ✅ | [readline](#nodereadline) |
575
+ | `node:repl` | 🚫 | [repl](#noderepl) |
576
+ | `node:sea` | ✅ | [sea](#nodesea) |
577
+ | `node:sqlite` | ✅ | [sqlite](#nodesqlite) |
578
+ | `node:stream` / `stream/promises` / `stream/consumers` | ✅ | [stream](#nodestream) |
579
+ | `node:stream/web` (+ globals `ReadableStream`, `WritableStream`, `TransformStream`, …) | ✅ | [stream/web](#nodestreamweb) |
580
+ | `node:string_decoder` | ✅ | [string_decoder](#nodestring_decoder) |
581
+ | `node:sys` | ✅ | [constants / sys](#nodeconstants--nodesys) |
582
+ | `node:test` | ✅ | [test](#nodetest) |
583
+ | `node:test/reporters` | ❌ | [test/reporters](#nodetestreporters) |
584
+ | `node:timers` / `node:timers/promises` | ✅ | [timers](#nodetimers) |
585
+ | `node:tls` | ✅ | [tls](#nodetls) |
586
+ | `node:trace_events` | 🚫 | [trace_events](#nodetrace_events) |
587
+ | `node:tty` | ✅ | [tty](#nodetty) |
588
+ | `node:url` (+ globals `URL`, `URLSearchParams`) | ✅ | [url](#nodeurl) |
589
+ | `node:util` / `node:util/types` | ✅ | [util](#nodeutil) |
590
+ | `node:v8` | ✅ | [v8](#nodev8) |
591
+ | `node:vm` | 🚫 | [vm](#nodevm) |
592
+ | `node:wasi` | ❌ | [wasi](#nodewasi) |
593
+ | `node:worker_threads` (+ globals `MessageChannel`, `MessagePort`, `BroadcastChannel`) | ✅ | [worker_threads](#nodeworker_threads) |
594
+ | `node:zlib` | ✅ | [zlib](#nodezlib) |
595
+ | Global `fetch` (+ `Headers`, `Request`, `Response`, `FormData`) | ✅ | [fetch](#fetch) |
496
596
 
497
597
  #### `node:path`
498
598
 
499
- | API | Status | Probe | Notes |
500
- | ------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | --------------------------------------------------------------------- |
501
- | `join` / `dirname` / `basename` / `extname` / `resolve` | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | Ports of Node's algorithms (not Go's `filepath`): same results as Node |
502
- | `normalize` / `relative` / `isAbsolute` / `parse` / `format` / `sep` / `delimiter` | ✅ | [lib-node-path-more.ts](conformance/lib-node-path-more.ts) | Trailing separators, `.bashrc`-style extensions, `''` for same paths |
503
- | `path.posix` / `path.win32` / `node:path/posix` / `toNamespacedPath` | ✅ | [lib-node-path-posix-win32.ts](conformance/lib-node-path-posix-win32.ts) | Both flavours on every OS (drive letters, UNC roots); `path` is the platform's |
504
- | `matchesGlob` (`*`, `**`, `?`, `[...]`, `{a,b}`; no leading-dot matches) | ✅ | [lib-node-path-glob.ts](conformance/lib-node-path-glob.ts) | minimatch-style patterns compiled to regular expressions |
599
+ | API | Status | Probe | Notes |
600
+ | ---------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
601
+ | `join` / `dirname` / `basename` / `extname` / `resolve` | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | Ports of Node's algorithms (not Go's `filepath`): same results as Node |
602
+ | `normalize` / `relative` / `isAbsolute` / `parse` / `format` / `sep` / `delimiter` | ✅ | [lib-node-path-more.ts](conformance/lib-node-path-more.ts) | Trailing separators, `.bashrc`-style extensions, `''` for same paths |
603
+ | `path.posix` / `path.win32` / `node:path/posix` / `toNamespacedPath` | ✅ | [lib-node-path-posix-win32.ts](conformance/lib-node-path-posix-win32.ts) | Both flavours on every OS (drive letters, UNC roots); `path` is the platform's |
604
+ | `matchesGlob` (`*`, `**`, `?`, `[...]`, `{a,b}`; no leading-dot matches) | ✅ | [lib-node-path-glob.ts](conformance/lib-node-path-glob.ts) | minimatch-style patterns compiled to regular expressions |
505
605
 
506
606
  #### `node:buffer`
507
607
 
508
- | API | Status | Probe | Notes |
509
- | --------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
510
- | `Buffer.from` / `alloc` / `concat` / `byteLength` / `isBuffer` / `compare`; `buf[i]`, `length` | ✅ | [lib-node-buffer.ts](conformance/lib-node-buffer.ts) | Buffers are Go `[]byte`; `subarray` / `slice` share memory; writes wrap modulo 256 |
511
- | `toString` / `equals` / `indexOf` / `includes` / `fill` / `write` / `copy` | ✅ | [lib-node-buffer.ts](conformance/lib-node-buffer.ts) | `` `${buf}` `` decodes UTF-8; `console.log(buf)` prints `<Buffer 68 69>` |
512
- | Encodings (utf8, hex, base64, base64url, latin1, ascii, utf16le); `atob` / `btoa` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | Invalid UTF-8 bytes decode to U+FFFD, as in Node |
513
- | `TextEncoder` / `TextDecoder` (`decode(bytes, { stream: true })`), minimal `Uint8Array` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | `Uint8Array` is `[]byte` too: `length`, indexing, `subarray`, `slice`, `set` |
514
- | `read*` / `write*` (U)Int8/16/32 LE/BE, Float, Double | ✅ | [lib-node-buffer-binary.ts](conformance/lib-node-buffer-binary.ts) | Out-of-range offsets throw `ERR_OUT_OF_RANGE` |
515
- | `Blob` / `File` (`size`, `type`, `name`, `lastModified`, `text()` / `bytes()` / `arrayBuffer()`, `slice`, `stream()`); parts of strings, Buffers and Blobs | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts) | Also globals; bytes held in memory |
516
- | `read/writeBigInt64LE/BE`, `read/writeBigUInt64LE/BE`, `swap16/32/64`; `isUtf8` / `isAscii` / `transcode` / `kMaxLength` | ✅ | [lib-node-buffer-bigint.ts](conformance/lib-node-buffer-bigint.ts) | bigints are `*big.Int` |
517
- | Typed arrays other than `Uint8Array` (`Int32Array`, `Float64Array`, `DataView`, …) | ❌ | — | Buffers and `Uint8Array`s are `[]byte`; other views are not implemented |
608
+ | API | Status | Probe | Notes |
609
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
610
+ | `Buffer.from` / `alloc` / `concat` / `byteLength` / `isBuffer` / `compare`; `buf[i]`, `length` | ✅ | [lib-node-buffer.ts](conformance/lib-node-buffer.ts) | Buffers are Go `[]byte`; `subarray` / `slice` share memory; writes wrap modulo 256 |
611
+ | `toString` / `equals` / `indexOf` / `includes` / `fill` / `write` / `copy` | ✅ | [lib-node-buffer.ts](conformance/lib-node-buffer.ts) | `` `${buf}` `` decodes UTF-8; `console.log(buf)` prints `<Buffer 68 69>` |
612
+ | Encodings (utf8, hex, base64, base64url, latin1, ascii, utf16le); `atob` / `btoa` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | Invalid UTF-8 bytes decode to U+FFFD, as in Node |
613
+ | `TextEncoder` / `TextDecoder` (`decode(bytes, { stream: true })`), minimal `Uint8Array` | ✅ | [lib-node-buffer-encodings.ts](conformance/lib-node-buffer-encodings.ts) | `Uint8Array` is `[]byte` too: `length`, indexing, `subarray`, `slice`, `set` |
614
+ | `read*` / `write*` (U)Int8/16/32 LE/BE, Float, Double | ✅ | [lib-node-buffer-binary.ts](conformance/lib-node-buffer-binary.ts) | Out-of-range offsets throw `ERR_OUT_OF_RANGE` |
615
+ | `Blob` / `File` (`size`, `type`, `name`, `lastModified`, `text()` / `bytes()` / `arrayBuffer()`, `slice`, `stream()`); parts of strings, Buffers and Blobs | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts) | Also globals; bytes held in memory |
616
+ | `read/writeBigInt64LE/BE`, `read/writeBigUInt64LE/BE`, `swap16/32/64`; `isUtf8` / `isAscii` / `transcode` / `kMaxLength` | ✅ | [lib-node-buffer-bigint.ts](conformance/lib-node-buffer-bigint.ts) | bigints are `*big.Int` |
617
+ | Typed arrays (`Int8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array`, `Float64Array`): indexing, `length` / `byteLength` / `buffer`, `from` / `of`, `fill` / `set` / `subarray` / `slice` / `copyWithin`, `map` / `filter` / `reduce` / `forEach` & co., `sort` / `toSorted`, `join`, `for…of`, spread; `ArrayBuffer` (`slice`, `isView`); `DataView` (all getters / setters incl. BigInt64) | ✅ | [lib-typed-arrays.ts](conformance/lib-typed-arrays.ts) | One Go slice per element type; views on an `ArrayBuffer` share its memory. Writes convert like JS (wrapping, clamping). A view's `.buffer` is its own bytes (`byteOffset` 0). Out-of-range reads give `0`, not `undefined`. |
618
+ | `BigInt64Array` / `BigUint64Array` | ❌ | — | `DataView` already has the BigInt64 accessors |
619
+ | `Float16Array`, resizable `ArrayBuffer` (`resize`, `transfer`), `Uint8Array` `toBase64` / `fromBase64` / `toHex` / `fromHex` | ❌ | — | Not declared |
518
620
 
519
621
  #### `node:fs`
520
622
 
521
- | API | Status | Probe | Notes |
522
- | --------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
523
- | `readFileSync` / `writeFileSync` / `appendFileSync` / `existsSync` / `rmSync` | ✅ | [lib-node-fs.ts](conformance/lib-node-fs.ts) | `readFileSync` returns a Buffer without an encoding, a string with one; `flag` option |
524
- | `statSync` / `lstatSync` (`Stats`) / `renameSync` / `copyFileSync` / `truncateSync` / `realpathSync` / `accessSync` / `unlinkSync` | ✅ | [lib-node-fs-stat.ts](conformance/lib-node-fs-stat.ts) | `throwIfNoEntry: false`; Go exposes only the modification time portably, so `atime` / `ctime` / `birthtime` report it too |
525
- | `mkdirSync` / `mkdtempSync` / `readdirSync` (`withFileTypes`, `recursive`) / `rmdirSync` / `cpSync` | ✅ | [lib-node-fs-dirs.ts](conformance/lib-node-fs-dirs.ts) | `Dirent` with `isFile()` / `isDirectory()` / `parentPath` |
526
- | Node system errors (`err.code` / `syscall` / `path` / `errno`) | ✅ | [lib-node-fs-errors.ts](conformance/lib-node-fs-errors.ts) | `ENOENT: no such file or directory, open 'x'`; `EEXIST`, `ENOTEMPTY`, `ERR_FS_EISDIR`, `COPYFILE_EXCL` |
527
- | File descriptors: `openSync` / `readSync` / `writeSync` / `fstatSync` / `closeSync` | ✅ | [lib-node-fs-fd.ts](conformance/lib-node-fs-fd.ts) | Flags `r`, `w`, `a`, `+`, `x`; positional reads and writes |
528
- | Callback API (`readFile(path, enc, (err, data) => …)` & co.) | ✅ | [lib-node-fs-callbacks.ts](conformance/lib-node-fs-callbacks.ts) | Work runs on a goroutine; callbacks run on the event loop |
529
- | `fs/promises` / `fs.promises` (incl. `FileHandle` from `open`) | ✅ | [lib-node-fs-promises.ts](conformance/lib-node-fs-promises.ts) | Rejections carry the error code |
530
- | `createReadStream` / `createWriteStream` | ✅ | [lib-node-fs-streams.ts](conformance/lib-node-fs-streams.ts) | `encoding`, `start` / `end`, `highWaterMark`, `flags` |
531
- | `chmodSync` / `utimesSync` / `symlinkSync` / `readlinkSync` / `linkSync` | ✅ | — | Implemented, not probed (symlinks need privileges on Windows) |
532
- | `watch` / `watchFile` | ❌ | — | Go's standard library has no file-system notifications |
623
+ | API | Status | Probe | Notes |
624
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
625
+ | `readFileSync` / `writeFileSync` / `appendFileSync` / `existsSync` / `rmSync` | ✅ | [lib-node-fs.ts](conformance/lib-node-fs.ts) | `readFileSync` returns a Buffer without an encoding, a string with one; `flag` option |
626
+ | `statSync` / `lstatSync` (`Stats`) / `renameSync` / `copyFileSync` / `truncateSync` / `realpathSync` / `accessSync` / `unlinkSync` | ✅ | [lib-node-fs-stat.ts](conformance/lib-node-fs-stat.ts) | `throwIfNoEntry: false`; Go exposes only the modification time portably, so `atime` / `ctime` / `birthtime` report it too |
627
+ | `mkdirSync` / `mkdtempSync` / `readdirSync` (`withFileTypes`, `recursive`) / `rmdirSync` / `cpSync` | ✅ | [lib-node-fs-dirs.ts](conformance/lib-node-fs-dirs.ts) | `Dirent` with `isFile()` / `isDirectory()` / `parentPath` |
628
+ | Node system errors (`err.code` / `syscall` / `path` / `errno`) | ✅ | [lib-node-fs-errors.ts](conformance/lib-node-fs-errors.ts) | `ENOENT: no such file or directory, open 'x'`; `EEXIST`, `ENOTEMPTY`, `ERR_FS_EISDIR`, `COPYFILE_EXCL` |
629
+ | File descriptors: `openSync` / `readSync` / `writeSync` / `fstatSync` / `closeSync` | ✅ | [lib-node-fs-fd.ts](conformance/lib-node-fs-fd.ts) | Flags `r`, `w`, `a`, `+`, `x`; positional reads and writes |
630
+ | Callback API (`readFile(path, enc, (err, data) => …)` & co.) | ✅ | [lib-node-fs-callbacks.ts](conformance/lib-node-fs-callbacks.ts) | Work runs on a goroutine; callbacks run on the event loop |
631
+ | `fs/promises` / `fs.promises` (incl. `FileHandle` from `open`) | ✅ | [lib-node-fs-promises.ts](conformance/lib-node-fs-promises.ts) | Rejections carry the error code |
632
+ | `createReadStream` / `createWriteStream` | ✅ | [lib-node-fs-streams.ts](conformance/lib-node-fs-streams.ts) | `encoding`, `start` / `end`, `highWaterMark`, `flags` |
633
+ | `chmodSync` / `utimesSync` / `symlinkSync` / `readlinkSync` / `linkSync` | ✅ | — | Implemented, not probed (symlinks need privileges on Windows) |
634
+ | `watch` (`recursive`, `persistent`, `signal`, `ref` / `unref`, `'change'` / `'error'` / `'close'`) / `watchFile` / `unwatchFile`; `fs/promises` `watch` | ✅ | [lib-node-fs-watch.ts](conformance/lib-node-fs-watch.ts) | `watch` uses the OS's notifications through the vendored `fsnotify` (only linked into programs that call it); recursive watches add subdirectories as they appear. `watchFile` polls `stat()` |
533
635
 
534
636
  #### `node:os`
535
637
 
536
- | API | Status | Probe | Notes |
537
- | -------------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | ----------------------------------------------------------------------- |
538
- | `platform` / `arch` / `type` / `machine` / `EOL` / `devNull` / `endianness` | ✅ | [lib-node-os.ts](conformance/lib-node-os.ts) | Node's names (`win32`, `x64`, `Windows_NT`, `x86_64`) |
539
- | `hostname` / `homedir` / `tmpdir` / `userInfo` / `cpus` / `availableParallelism` / `networkInterfaces` / `constants.signals` | ✅ | [lib-node-os.ts](conformance/lib-node-os.ts) | `cpus()` has one entry per logical CPU (model / speed / times are zero) |
540
- | `totalmem` / `freemem` / `uptime` / `loadavg` / `release` / `version` | ✅ | [lib-node-os-mem.ts](conformance/lib-node-os-mem.ts) | `/proc` on Linux, `sysctl` on macOS / BSD, `GlobalMemoryStatusEx` / `GetTickCount64` on Windows (`loadavg` is zeros there, as in Node) |
638
+ | API | Status | Probe | Notes |
639
+ | ---------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
640
+ | `platform` / `arch` / `type` / `machine` / `EOL` / `devNull` / `endianness` | ✅ | [lib-node-os.ts](conformance/lib-node-os.ts) | Node's names (`win32`, `x64`, `Windows_NT`, `x86_64`) |
641
+ | `hostname` / `homedir` / `tmpdir` / `userInfo` / `cpus` / `availableParallelism` / `networkInterfaces` / `constants.signals` | ✅ | [lib-node-os.ts](conformance/lib-node-os.ts) | `cpus()` has one entry per logical CPU (model / speed / times are zero) |
642
+ | `totalmem` / `freemem` / `uptime` / `loadavg` / `release` / `version` | ✅ | [lib-node-os-mem.ts](conformance/lib-node-os-mem.ts) | `/proc` on Linux, `sysctl` on macOS / BSD, `GlobalMemoryStatusEx` / `GetTickCount64` on Windows (`loadavg` is zeros there, as in Node) |
541
643
 
542
644
  #### `node:process`
543
645
 
544
- | API | Status | Probe | Notes |
545
- | ---------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | --------------------------------------------------------------------------- |
546
- | `argv` / `argv0` / `execPath` / `execArgv` / `pid` / `ppid` / `arch` / `version` / `versions` | ✅ | [lib-node-process.ts](conformance/lib-node-process.ts) | `argv` has Node's shape: `[execPath, script, ...args]`; `version` is `v24.0.0`; `versions.go` is Go's |
547
- | `hrtime` / `hrtime.bigint` / `uptime` / `memoryUsage` / `chdir` / `cwd` / `stdout.write` / `nextTick` / `exitCode` | ✅ | [lib-node-process.ts](conformance/lib-node-process.ts) | `exitCode` is applied when the event loop drains |
548
- | `process.env` reads, writes, `delete`, `in`, `Object.keys(process.env)`; `import { env } from 'node:process'` | ✅ | [lib-node-process-env.ts](conformance/lib-node-process-env.ts) | `os.Setenv` / `os.Unsetenv`; missing variables read as `""` |
549
- | `process.on('exit' \| 'SIGINT' \| 'SIGTERM' \| 'SIGHUP')` / `once` / `off` / `emit` | ✅ | [lib-node-process-events.ts](conformance/lib-node-process-events.ts) | `'exit'` runs after the event loop with the exit code; signals arrive on the loop |
550
- | `process.stdin` / `stdout` / `stderr` as streams | ✅ | [lib-node-child-process-async.ts](conformance/lib-node-child-process-async.ts) | `stdin` keeps the process alive only while flowing |
551
- | `kill` / `emitWarning` / `getuid` / `getgid` | ✅ | — | Implemented, not probed |
552
- | `on('uncaughtException')` / `'uncaughtExceptionMonitor'` / `'unhandledRejection'` / `'beforeExit'` (per drain, can schedule more work); `cpuUsage` / `resourceUsage` / `availableMemory` / `loadEnvFile` | ✅ | [lib-node-process-uncaught.ts](conformance/lib-node-process-uncaught.ts), [lib-node-os-mem.ts](conformance/lib-node-os-mem.ts) | Throws in the top-level code, loop callbacks and detached async calls reach the handlers; CPU times from `/proc` (Linux) or Go's runtime metrics |
553
- | `umask` / `stdout.columns` / `setRawMode` | ❌ | — | Need OS-specific syscalls a single portable binary can't contain |
646
+ | API | Status | Probe | Notes |
647
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
648
+ | `argv` / `argv0` / `execPath` / `execArgv` / `pid` / `ppid` / `arch` / `version` / `versions` | ✅ | [lib-node-process.ts](conformance/lib-node-process.ts) | `argv` has Node's shape: `[execPath, script, ...args]`; `version` is `v24.0.0`; `versions.go` is Go's |
649
+ | `hrtime` / `hrtime.bigint` / `uptime` / `memoryUsage` / `chdir` / `cwd` / `stdout.write` / `nextTick` / `exitCode` | ✅ | [lib-node-process.ts](conformance/lib-node-process.ts) | `exitCode` is applied when the event loop drains |
650
+ | `process.env` reads, writes, `delete`, `in`, `Object.keys(process.env)`; `import { env } from 'node:process'` | ✅ | [lib-node-process-env.ts](conformance/lib-node-process-env.ts) | `os.Setenv` / `os.Unsetenv`; missing variables read as `""` |
651
+ | `process.on('exit' \| 'SIGINT' \| 'SIGTERM' \| 'SIGHUP')` / `once` / `off` / `emit` | ✅ | [lib-node-process-events.ts](conformance/lib-node-process-events.ts) | `'exit'` runs after the event loop with the exit code; signals arrive on the loop |
652
+ | `process.stdin` / `stdout` / `stderr` as streams | ✅ | [lib-node-child-process-async.ts](conformance/lib-node-child-process-async.ts) | `stdin` keeps the process alive only while flowing |
653
+ | `kill` / `emitWarning` / `getuid` / `getgid` | ✅ | — | Implemented, not probed |
654
+ | `on('uncaughtException')` / `'uncaughtExceptionMonitor'` / `'unhandledRejection'` / `'beforeExit'` (per drain, can schedule more work); `cpuUsage` / `resourceUsage` / `availableMemory` / `loadEnvFile` | ✅ | [lib-node-process-uncaught.ts](conformance/lib-node-process-uncaught.ts), [lib-node-os-mem.ts](conformance/lib-node-os-mem.ts) | Throws in the top-level code, loop callbacks and detached async calls reach the handlers; CPU times from `/proc` (Linux) or Go's runtime metrics |
655
+ | `stdout.columns` / `rows` / `getWindowSize()` (and `stderr`), `stdin.setRawMode` / `isRaw`, `umask` | ✅ | [lib-node-process-tty.ts](conformance/lib-node-process-tty.ts) | A per-OS helper: `TIOCGWINSZ` and termios ioctls (Linux, macOS, FreeBSD), the console API (Windows). `columns` / `rows` are `0`, not `undefined`, when not a terminal (`columns \|\| 80` still works); raw mode is libuv's and is undone at exit; `setRawMode` throws when stdin isn't a terminal. No raw mode on Linux PowerPC / MIPS, no `umask` on Windows (`0`, as in Node); no `'resize'` event |
554
656
 
555
657
  #### `node:console`
556
658
 
557
- | API | Status | Probe | Notes |
558
- | ----------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------------------- |
559
- | Module re-export (`import { log } from 'node:console'`) | ✅ | [lib-node-console-class.ts](conformance/lib-node-console-class.ts) | Same as the global `console` |
560
- | `new Console(stdout, stderr)` / `new Console({ stdout, stderr })` | ✅ | [lib-node-console-class.ts](conformance/lib-node-console-class.ts) | `log` / `info` / `debug` / `error` / `warn` / `dir` |
659
+ | API | Status | Probe | Notes |
660
+ | ----------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | --------------------------------------------------- |
661
+ | Module re-export (`import { log } from 'node:console'`) | ✅ | [lib-node-console-class.ts](conformance/lib-node-console-class.ts) | Same as the global `console` |
662
+ | `new Console(stdout, stderr)` / `new Console({ stdout, stderr })` | ✅ | [lib-node-console-class.ts](conformance/lib-node-console-class.ts) | `log` / `info` / `debug` / `error` / `warn` / `dir` |
561
663
 
562
664
  #### `node:util`
563
665
 
564
- | API | Status | Probe | Notes |
565
- | ------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
566
- | `format` / `formatWithOptions` (`%s %d %i %f %j %o %O %c %%`) | ✅ | [lib-node-util-format.ts](conformance/lib-node-util-format.ts) | Extra arguments appended; also used by `console.log` |
567
- | `inspect` (`depth`, `breakLength`, `compact`) | ✅ | [lib-node-util-inspect.ts](conformance/lib-node-util-inspect.ts) | Node's layout rules: single line up to 80 columns, number arrays grouped in columns, `Map(1) {…}`, `ClassName {…}`, `[Circular *1]` |
568
- | `isDeepStrictEqual` / `types.*` (`node:util/types`) / `deprecate` / `stripVTControlCharacters` / `styleText` | ✅ | [lib-node-util-misc.ts](conformance/lib-node-util-misc.ts) | `styleText` colours only TTYs unless `validateStream: false` |
569
- | `promisify` / `callbackify` | ✅ | [lib-node-util-promisify.ts](conformance/lib-node-util-promisify.ts) | Node functions map to their promise versions at compile time (`fs.readFile`, `setTimeout`, `exec`); other functions are wrapped |
570
- | `parseArgs` (short / long / grouped flags, `multiple`, `default`, `strict`, `allowPositionals`, `allowNegative`, `tokens`, Node's errors), `getSystemErrorName` / `getSystemErrorMessage` / `getSystemErrorMap`, `MIMEType` / `MIMEParams`, `parseEnv` (+ `process.loadEnvFile`), `aborted`, `debuglog` (`NODE_DEBUG`), `toUSVString` | ✅ | [lib-node-util-parse-args.ts](conformance/lib-node-util-parse-args.ts) | |
571
- | `inherits` (legacy), `inspect.custom` (symbols), `getCallSites` (V8 stack frames) | ❌ | — | Legacy or engine-specific |
572
- | Node's errno numbers on Windows (libuv's: `ENOENT` is `-4058`) | ❌ | — | errno values are the OS's (Go's `syscall` numbers): the same as Node's on Linux and macOS, but `ENOENT` is `-2` on Windows. `getSystemErrorName(err.errno)` still names any error TypeNative raises |
666
+ | API | Status | Probe | Notes |
667
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
668
+ | `format` / `formatWithOptions` (`%s %d %i %f %j %o %O %c %%`) | ✅ | [lib-node-util-format.ts](conformance/lib-node-util-format.ts) | Extra arguments appended; also used by `console.log` |
669
+ | `inspect` (`depth`, `breakLength`, `compact`) | ✅ | [lib-node-util-inspect.ts](conformance/lib-node-util-inspect.ts) | Node's layout rules: single line up to 80 columns, number arrays grouped in columns, `Map(1) {…}`, `ClassName {…}`, `[Circular *1]` |
670
+ | `isDeepStrictEqual` / `types.*` (`node:util/types`) / `deprecate` / `stripVTControlCharacters` / `styleText` | ✅ | [lib-node-util-misc.ts](conformance/lib-node-util-misc.ts) | `styleText` colours only TTYs unless `validateStream: false` |
671
+ | `promisify` / `callbackify` | ✅ | [lib-node-util-promisify.ts](conformance/lib-node-util-promisify.ts) | Node functions map to their promise versions at compile time (`fs.readFile`, `setTimeout`, `exec`); other functions are wrapped |
672
+ | `parseArgs` (short / long / grouped flags, `multiple`, `default`, `strict`, `allowPositionals`, `allowNegative`, `tokens`, Node's errors), `getSystemErrorName` / `getSystemErrorMessage` / `getSystemErrorMap`, `MIMEType` / `MIMEParams`, `parseEnv` (+ `process.loadEnvFile`), `aborted`, `debuglog` (`NODE_DEBUG`), `toUSVString` | ✅ | [lib-node-util-parse-args.ts](conformance/lib-node-util-parse-args.ts) | |
673
+ | `inspect.custom` methods, `getCallSites` | ❌ | — | `[inspect.custom]()` can lower to a method like `[Symbol.dispose]()`; `getCallSites` can read `runtime.Callers`, which reports `.ts` lines through the `//line` directives |
674
+ | `inherits` (legacy) | 🚫 | — | Rewrites prototypes; classes are static Go structs |
675
+ | Node's errno numbers per OS (`err.errno`, `getSystemErrorMap`) | ✅ | [lib-node-errno.ts](conformance/lib-node-errno.ts) | libuv's table, generated into `src/node/errno_tables.ts`: the OS's errno on Unix (`ECONNREFUSED` is `-111` on Linux, `-61` on macOS) and libuv's fixed numbers on Windows (`ENOENT` is `-4058`). Messages are libuv's; the map matches Node's on Linux entry for entry |
573
676
 
574
677
  #### `node:assert`
575
678
 
576
- | API | Status | Probe | Notes |
577
- | ----------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | --------------------------------------------------------------------------- |
578
- | `assert` / `ok` / `equal` / `strictEqual` (+ `not*`) / `match` / `throws` / `doesNotThrow` / `fail` / `ifError`; `node:assert/strict` | ✅ | [lib-node-assert.ts](conformance/lib-node-assert.ts) | Failures throw an `AssertionError` (`code: 'ERR_ASSERTION'`, `actual`, `expected`, `operator`); `throws` validates with a RegExp, class or object |
579
- | `deepEqual` / `deepStrictEqual` (+ `not*`) / `rejects` / `doesNotReject` | ✅ | [lib-node-assert-deep.ts](conformance/lib-node-assert-deep.ts) | Key order is ignored for objects, Maps and Sets; failure messages are simplified (no diff) |
679
+ | API | Status | Probe | Notes |
680
+ | ------------------------------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
681
+ | `assert` / `ok` / `equal` / `strictEqual` (+ `not*`) / `match` / `throws` / `doesNotThrow` / `fail` / `ifError`; `node:assert/strict` | ✅ | [lib-node-assert.ts](conformance/lib-node-assert.ts) | Failures throw an `AssertionError` (`code: 'ERR_ASSERTION'`, `actual`, `expected`, `operator`); `throws` validates with a RegExp, class or object |
682
+ | `deepEqual` / `deepStrictEqual` (+ `not*`) / `rejects` / `doesNotReject` | ✅ | [lib-node-assert-deep.ts](conformance/lib-node-assert-deep.ts) | Key order is ignored for objects, Maps and Sets; failure messages are simplified (no diff) |
580
683
 
581
684
  #### `node:url`
582
685
 
583
- | API | Status | Probe | Notes |
584
- | -------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
585
- | `fileURLToPath` / `pathToFileURL` | ✅ | [lib-node-url.ts](conformance/lib-node-url.ts) | `pathToFileURL` returns a `URL`; Windows drive letters |
586
- | `URL` (WHATWG): parsing, relative resolution, getters / setters, `canParse`, `parse`; `domainToASCII` / `domainToUnicode`; `format` | ✅ | [lib-node-url-class.ts](conformance/lib-node-url-class.ts) | Special schemes, dot segments, default ports, percent-encode sets, IDN hosts (punycode); invalid input throws `ERR_INVALID_URL` |
587
- | `URLSearchParams` (and `url.searchParams`, kept in sync) | ✅ | [lib-node-url-search-params.ts](conformance/lib-node-url-search-params.ts) | `for...of`, `forEach`, `sort`, construction from strings / objects / pairs |
588
- | Legacy `url.parse` / `url.resolve` | ❌ | — | Deprecated upstream; not implemented |
686
+ | API | Status | Probe | Notes |
687
+ | ----------------------------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
688
+ | `fileURLToPath` / `pathToFileURL` | ✅ | [lib-node-url.ts](conformance/lib-node-url.ts) | `pathToFileURL` returns a `URL`; Windows drive letters |
689
+ | `URL` (WHATWG): parsing, relative resolution, getters / setters, `canParse`, `parse`; `domainToASCII` / `domainToUnicode`; `format` | ✅ | [lib-node-url-class.ts](conformance/lib-node-url-class.ts) | Special schemes, dot segments, default ports, percent-encode sets, IDN hosts (punycode); invalid input throws `ERR_INVALID_URL` |
690
+ | `URLSearchParams` (and `url.searchParams`, kept in sync) | ✅ | [lib-node-url-search-params.ts](conformance/lib-node-url-search-params.ts) | `for...of`, `forEach`, `sort`, construction from strings / objects / pairs |
691
+ | Legacy `url.parse` / `url.resolve` | ❌ | — | Deprecated upstream, but a pure port is feasible |
589
692
 
590
693
  #### `node:querystring`
591
694
 
592
- | API | Status | Probe | Notes |
593
- | --------------------------------------------------------------------- | :----: | ------------------------------------------------------------ | ------------------------------------------ |
594
- | `parse` / `stringify` / `escape` / `unescape` / `decode` / `encode` | ✅ | [lib-node-querystring.ts](conformance/lib-node-querystring.ts) | Repeated keys become arrays; custom separators |
695
+ | API | Status | Probe | Notes |
696
+ | ------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | ---------------------------------------------- |
697
+ | `parse` / `stringify` / `escape` / `unescape` / `decode` / `encode` | ✅ | [lib-node-querystring.ts](conformance/lib-node-querystring.ts) | Repeated keys become arrays; custom separators |
595
698
 
596
699
  #### `node:punycode`
597
700
 
598
- | API | Status | Probe | Notes |
599
- | --------------------------------------------- | :----: | -------------------------------------------------------- | ------------------------------- |
600
- | `encode` / `decode` / `toASCII` / `toUnicode` | ✅ | [lib-node-punycode.ts](conformance/lib-node-punycode.ts) | RFC 3492 (deprecated upstream) |
701
+ | API | Status | Probe | Notes |
702
+ | --------------------------------------------- | :----: | -------------------------------------------------------- | ------------------------------ |
703
+ | `encode` / `decode` / `toASCII` / `toUnicode` | ✅ | [lib-node-punycode.ts](conformance/lib-node-punycode.ts) | RFC 3492 (deprecated upstream) |
601
704
 
602
705
  #### `node:string_decoder`
603
706
 
604
- | API | Status | Probe | Notes |
605
- | --------------------------------------- | :----: | ------------------------------------------------------------------ | ----------------------------------------------------------- |
606
- | `StringDecoder` (`write` / `end`) | ✅ | [lib-node-string-decoder.ts](conformance/lib-node-string-decoder.ts) | Holds back split UTF-8 / UTF-16LE characters and base64 groups |
707
+ | API | Status | Probe | Notes |
708
+ | --------------------------------- | :----: | -------------------------------------------------------------------- | -------------------------------------------------------------- |
709
+ | `StringDecoder` (`write` / `end`) | ✅ | [lib-node-string-decoder.ts](conformance/lib-node-string-decoder.ts) | Holds back split UTF-8 / UTF-16LE characters and base64 groups |
607
710
 
608
711
  #### `node:crypto`
609
712
 
610
- | API | Status | Probe | Notes |
611
- | ------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------- | ------------------------------------------------------------------------- |
612
- | `createHash` / `createHmac` / `hash` / `getHashes` (`update` / `digest` / `copy`) | ✅ | [lib-node-crypto-hash.ts](conformance/lib-node-crypto-hash.ts) | md5, sha1, sha224/256/384/512, sha512-224/256, sha3-224/256/384/512 |
613
- | `randomBytes` / `randomUUID` / `randomInt` / `getRandomValues` / `timingSafeEqual`; global `crypto` | ✅ | [lib-node-crypto-random.ts](conformance/lib-node-crypto-random.ts) | `crypto/rand` |
614
- | `pbkdf2Sync` / `hkdfSync` | ✅ | [lib-node-crypto-kdf.ts](conformance/lib-node-crypto-kdf.ts) | `crypto/pbkdf2` / `crypto/hkdf` (Go 1.24+) |
615
- | `createCipheriv` / `createDecipheriv` (aes-128/192/256-cbc/ctr/gcm) | ✅ | [lib-node-crypto-cipher.ts](conformance/lib-node-crypto-cipher.ts) | GCM output arrives from `final()` (authenticated as a whole) |
616
- | `scryptSync` / `scrypt` (`N` / `r` / `p` / `maxmem` and their aliases); callback forms of `pbkdf2`, `hkdf`, `randomBytes`, `randomFill`; `randomFillSync` | ✅ | [lib-node-crypto-scrypt.ts](conformance/lib-node-crypto-scrypt.ts) | scrypt written out over `crypto/pbkdf2` (Salsa20/8, BlockMix, ROMix); callbacks run on the event loop |
617
- | `KeyObject` (`type`, `asymmetricKeyType`, `asymmetricKeyDetails`, `symmetricKeySize`, `export` as PEM / DER / JWK, `equals`, `KeyObject.from`), `createPrivateKey` / `createPublicKey` / `createSecretKey` (PEM, DER, JWK; pkcs1 / pkcs8 / sec1 / spki; certificates) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | RSA, EC (P-256 / P-384 / P-521), Ed25519, X25519 |
618
- | `generateKeyPair(Sync)` (`rsa`, `ec`, `ed25519`, `x25519`; KeyObjects or `publicKeyEncoding` / `privateKeyEncoding`), `generateKey(Sync)` (`hmac`, `aes`) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | RSA keys use the public exponent 65537 |
619
- | `sign` / `verify`, `createSign` / `createVerify` (RSA PKCS#1 v1.5 and PSS with `saltLength`, ECDSA in DER or `ieee-p1363`, Ed25519); `publicEncrypt` / `privateDecrypt` (OAEP with `oaepHash` / `oaepLabel`, PKCS#1, none), `privateEncrypt` / `publicDecrypt`; `crypto.constants` | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | |
620
- | `createECDH` (compressed / uncompressed keys), `getCurves`, `diffieHellman` (ec / x25519 KeyObjects), `createDiffieHellman` / `getDiffieHellman` (modp1 – modp18) | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | `createDiffieHellman(bits)` generates a random (not safe) prime |
621
- | `generatePrime(Sync)` (`bigint`, `safe`, `add` / `rem`), `checkPrime(Sync)` | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | `math/big`'s Miller-Rabin |
622
- | `X509Certificate` (`subject`, `issuer`, `subjectAltName`, `validFrom` / `validTo` (+ `Date`s), fingerprints, `serialNumber`, `ca`, `publicKey`, `raw`, `keyUsage`, `checkHost` / `checkIP` / `checkEmail`, `checkIssued`, `verify`, `toString`, `toLegacyObject`) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | `crypto/x509` |
623
- | `crypto.subtle` / `webcrypto.subtle`: `digest`, `generateKey`, `importKey` / `exportKey` (`raw`, `spki`, `pkcs8`, `jwk`), `sign` / `verify` (HMAC, RSASSA-PKCS1-v1_5, RSA-PSS, ECDSA, Ed25519), `encrypt` / `decrypt` (AES-GCM / CBC / CTR, RSA-OAEP), `deriveBits` / `deriveKey` (PBKDF2, HKDF, ECDH, X25519), `wrapKey` / `unwrapKey` | ✅ | [lib-node-crypto-subtle.ts](conformance/lib-node-crypto-subtle.ts) | Key usages are recorded but not enforced |
624
- | Encrypted private keys (`passphrase` / `cipher`), `rsa-pss` / `dsa` / `dh` / `ed448` / `x448` key types, `secp256k1`, AES-KW, `Certificate` (SPKAC), `hash` streams (`createHash` as a stream) | ❌ | — | No Go standard-library support (encrypted PKCS#8, these algorithms) |
713
+ | API | Status | Probe | Notes |
714
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
715
+ | `createHash` / `createHmac` / `hash` / `getHashes` (`update` / `digest` / `copy`) | ✅ | [lib-node-crypto-hash.ts](conformance/lib-node-crypto-hash.ts) | md5, sha1, sha224/256/384/512, sha512-224/256, sha3-224/256/384/512 |
716
+ | `randomBytes` / `randomUUID` / `randomInt` / `getRandomValues` / `timingSafeEqual`; global `crypto` | ✅ | [lib-node-crypto-random.ts](conformance/lib-node-crypto-random.ts) | `crypto/rand` |
717
+ | `pbkdf2Sync` / `hkdfSync` | ✅ | [lib-node-crypto-kdf.ts](conformance/lib-node-crypto-kdf.ts) | `crypto/pbkdf2` / `crypto/hkdf` (Go 1.24+) |
718
+ | `createCipheriv` / `createDecipheriv` (aes-128/192/256-cbc/ctr/gcm) | ✅ | [lib-node-crypto-cipher.ts](conformance/lib-node-crypto-cipher.ts) | GCM output arrives from `final()` (authenticated as a whole) |
719
+ | `scryptSync` / `scrypt` (`N` / `r` / `p` / `maxmem` and their aliases); callback forms of `pbkdf2`, `hkdf`, `randomBytes`, `randomFill`; `randomFillSync` | ✅ | [lib-node-crypto-scrypt.ts](conformance/lib-node-crypto-scrypt.ts) | scrypt written out over `crypto/pbkdf2` (Salsa20/8, BlockMix, ROMix); callbacks run on the event loop |
720
+ | `KeyObject` (`type`, `asymmetricKeyType`, `asymmetricKeyDetails`, `symmetricKeySize`, `export` as PEM / DER / JWK, `equals`, `KeyObject.from`), `createPrivateKey` / `createPublicKey` / `createSecretKey` (PEM, DER, JWK; pkcs1 / pkcs8 / sec1 / spki; certificates) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | RSA, EC (P-256 / P-384 / P-521), Ed25519, X25519 |
721
+ | `generateKeyPair(Sync)` (`rsa`, `ec`, `ed25519`, `x25519`; KeyObjects or `publicKeyEncoding` / `privateKeyEncoding`), `generateKey(Sync)` (`hmac`, `aes`) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | RSA keys use the public exponent 65537 |
722
+ | `sign` / `verify`, `createSign` / `createVerify` (RSA PKCS#1 v1.5 and PSS with `saltLength`, ECDSA in DER or `ieee-p1363`, Ed25519); `publicEncrypt` / `privateDecrypt` (OAEP with `oaepHash` / `oaepLabel`, PKCS#1, none), `privateEncrypt` / `publicDecrypt`; `crypto.constants` | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | |
723
+ | `createECDH` (compressed / uncompressed keys), `getCurves`, `diffieHellman` (ec / x25519 KeyObjects), `createDiffieHellman` / `getDiffieHellman` (modp1 – modp18) | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | `createDiffieHellman(bits)` generates a random (not safe) prime |
724
+ | `generatePrime(Sync)` (`bigint`, `safe`, `add` / `rem`), `checkPrime(Sync)` | ✅ | [lib-node-crypto-sign.ts](conformance/lib-node-crypto-sign.ts) | `math/big`'s Miller-Rabin |
725
+ | `X509Certificate` (`subject`, `issuer`, `subjectAltName`, `validFrom` / `validTo` (+ `Date`s), fingerprints, `serialNumber`, `ca`, `publicKey`, `raw`, `keyUsage`, `checkHost` / `checkIP` / `checkEmail`, `checkIssued`, `verify`, `toString`, `toLegacyObject`) | ✅ | [lib-node-crypto-keys.ts](conformance/lib-node-crypto-keys.ts) | `crypto/x509` |
726
+ | `crypto.subtle` / `webcrypto.subtle`: `digest`, `generateKey`, `importKey` / `exportKey` (`raw`, `spki`, `pkcs8`, `jwk`), `sign` / `verify` (HMAC, RSASSA-PKCS1-v1_5, RSA-PSS, ECDSA, Ed25519), `encrypt` / `decrypt` (AES-GCM / CBC / CTR, RSA-OAEP), `deriveBits` / `deriveKey` (PBKDF2, HKDF, ECDH, X25519), `wrapKey` / `unwrapKey` | ✅ | [lib-node-crypto-subtle.ts](conformance/lib-node-crypto-subtle.ts) | Key usages are recorded but not enforced |
727
+ | `Hash` / `Hmac` as streams (`write` / `end`, `'readable'`, `pipe` into a hash, `pipeline`, `setEncoding`) | ✅ | [lib-node-crypto-hash-stream.ts](conformance/lib-node-crypto-hash-stream.ts) | A transform that pushes the digest at the end, as in Node; afterwards `hash.digest()` throws and `hmac.digest()` is empty. Only programs that use a hash as a stream carry the stream code |
728
+ | AES key wrap: `id-aes128-wrap` … `id-aes256-wrap-pad` (and the `aes128-wrap` aliases) | ✅ | [lib-node-crypto-keywrap.ts](conformance/lib-node-crypto-keywrap.ts) | RFC 3394 and RFC 5649, checked against the RFC vectors; the whole input goes through one `update()`, as with OpenSSL |
729
+ | Encrypted private keys (`passphrase` / `cipher`), `rsa-pss` / `dsa` / `dh` / `ed448` / `x448` key types, `secp256k1`, `Certificate` (SPKAC) | ❌ | — | Not in Go's standard library, but portable: encrypted PKCS#8 is PBES2 over `pbkdf2` + AES-CBC; `rsa-pss` / `dsa` / `dh` keys and SPKAC are ASN.1 on existing primitives; `secp256k1` / `ed448` / `x448` need vendored curve code |
625
730
 
626
731
  #### `node:zlib`
627
732
 
628
- | API | Status | Probe | Notes |
629
- | ---------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------- | -------------------------------------------------------- |
630
- | `gzipSync` / `gunzipSync` / `deflateSync` / `inflateSync` / `deflateRawSync` / `inflateRawSync` / `unzipSync` / `crc32` / `constants` | ✅ | [lib-node-zlib.ts](conformance/lib-node-zlib.ts) | `{ level }`; invalid input throws `Z_DATA_ERROR` |
631
- | `createGzip` / `createGunzip` / `createDeflate` / `createInflate` / `createDeflateRaw` / `createInflateRaw` / `createUnzip` | ✅ | [lib-node-zlib-streams.ts](conformance/lib-node-zlib-streams.ts) | Transforms that (de)compress when the input ends |
632
- | Callback forms `gzip` / `gunzip` / `deflate` / `inflate` / `deflateRaw` / `inflateRaw` / `unzip` (`buf, [options], cb`) and `util.promisify` of them | ✅ | [lib-node-zlib-async.ts](conformance/lib-node-zlib-async.ts) | The codec runs on a goroutine; the callback runs on the event loop |
633
- | Brotli (`brotliCompressSync` & co.) | ❌ | — | Go's standard library has no Brotli codec |
733
+ | API | Status | Probe | Notes |
734
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
735
+ | `gzipSync` / `gunzipSync` / `deflateSync` / `inflateSync` / `deflateRawSync` / `inflateRawSync` / `unzipSync` / `crc32` / `constants` | ✅ | [lib-node-zlib.ts](conformance/lib-node-zlib.ts) | `{ level }`; invalid input throws `Z_DATA_ERROR` |
736
+ | `createGzip` / `createGunzip` / `createDeflate` / `createInflate` / `createDeflateRaw` / `createInflateRaw` / `createUnzip` | ✅ | [lib-node-zlib-streams.ts](conformance/lib-node-zlib-streams.ts) | Transforms that (de)compress when the input ends |
737
+ | Callback forms `gzip` / `gunzip` / `deflate` / `inflate` / `deflateRaw` / `inflateRaw` / `unzip` (`buf, [options], cb`) and `util.promisify` of them | ✅ | [lib-node-zlib-async.ts](conformance/lib-node-zlib-async.ts) | The codec runs on a goroutine; the callback runs on the event loop |
738
+ | Brotli: `brotliCompressSync` / `brotliDecompressSync`, callback and promisified `brotliCompress` / `brotliDecompress`, `createBrotliCompress` / `createBrotliDecompress`, `constants.BROTLI_*` | ✅ | [lib-node-zlib-brotli.ts](conformance/lib-node-zlib-brotli.ts) | The vendored `andybalholm/brotli` (pure Go, only linked into programs that use it); `params` quality / window. Output matches Node's; decoder errors carry Node's codes |
634
739
 
635
740
  #### `node:timers`
636
741
 
637
- | API | Status | Probe | Notes |
638
- | -------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | -------------------------------------------------------------------------- |
639
- | `setTimeout` / `setInterval` / `setImmediate` (+ extra arguments) / `clear*`; global `setImmediate` | ✅ | [lib-node-timers.ts](conformance/lib-node-timers.ts) | Callbacks run on the event loop |
640
- | `node:timers/promises` (`setTimeout`, `setImmediate`, `setInterval`, `scheduler`) | ✅ | [lib-node-timers-promises.ts](conformance/lib-node-timers-promises.ts) | `{ signal }` aborts; `setInterval` is an async iterator |
641
- | `Timeout` / `Immediate` handles: `ref` / `unref` / `hasRef` / `refresh` / `close` (also on intervals) | ✅ | [lib-node-timers-ref.ts](conformance/lib-node-timers-ref.ts) | Unref'ed timers don't keep the process alive |
742
+ | API | Status | Probe | Notes |
743
+ | ----------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ------------------------------------------------------- |
744
+ | `setTimeout` / `setInterval` / `setImmediate` (+ extra arguments) / `clear*`; global `setImmediate` | ✅ | [lib-node-timers.ts](conformance/lib-node-timers.ts) | Callbacks run on the event loop |
745
+ | `node:timers/promises` (`setTimeout`, `setImmediate`, `setInterval`, `scheduler`) | ✅ | [lib-node-timers-promises.ts](conformance/lib-node-timers-promises.ts) | `{ signal }` aborts; `setInterval` is an async iterator |
746
+ | `Timeout` / `Immediate` handles: `ref` / `unref` / `hasRef` / `refresh` / `close` (also on intervals) | ✅ | [lib-node-timers-ref.ts](conformance/lib-node-timers-ref.ts) | Unref'ed timers don't keep the process alive |
642
747
 
643
748
  #### `node:perf_hooks`
644
749
 
645
- | API | Status | Probe | Notes |
646
- | -------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------- |
647
- | `performance.now` / `timeOrigin` / `mark` / `measure` / `getEntries*` / `clearMarks`; global `performance` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Monotonic milliseconds since process start |
648
- | `PerformanceObserver` (`entryTypes` / `type` + `buffered`, batched, sorted by `startTime`), `timerify`, `createHistogram`, `monitorEventLoopDelay`, `eventLoopUtilization` | ✅ | [lib-node-perf-observer.ts](conformance/lib-node-perf-observer.ts) | `eventLoopUtilization` is estimated from CPU time |
750
+ | API | Status | Probe | Notes |
751
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ------------------------------------------------- |
752
+ | `performance.now` / `timeOrigin` / `mark` / `measure` / `getEntries*` / `clearMarks`; global `performance` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Monotonic milliseconds since process start |
753
+ | `PerformanceObserver` (`entryTypes` / `type` + `buffered`, batched, sorted by `startTime`), `timerify`, `createHistogram`, `monitorEventLoopDelay`, `eventLoopUtilization` | ✅ | [lib-node-perf-observer.ts](conformance/lib-node-perf-observer.ts) | `eventLoopUtilization` is estimated from CPU time |
649
754
 
650
755
  #### `node:tty`
651
756
 
652
- | API | Status | Probe | Notes |
653
- | ------------ | :----: | ---------------------------------------------------------- | ---------------------------------------- |
654
- | `isatty(fd)` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Character-device check on fds 0–2 |
655
- | `ReadStream` / `WriteStream` (`columns`, `setRawMode`) | ❌ | — | Terminal sizes need non-portable syscalls |
757
+ | API | Status | Probe | Notes |
758
+ | ------------------------------------ | :----: | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
759
+ | `isatty(fd)` | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Character-device check on fds 0–2 |
760
+ | `ReadStream` / `WriteStream` classes | ❌ | — | Feasible; the terminal calls behind them exist (`process.stdout.columns`, `process.stdin.setRawMode` in [process](#nodeprocess)) |
656
761
 
657
762
  #### `node:constants` / `node:sys`
658
763
 
659
- | API | Status | Probe | Notes |
660
- | ----------------------------------------- | :----: | ---------------------------------------------------------- | ---------------------------------------------------- |
661
- | `node:constants` (`F_OK`, `SIGINT`, …) | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Deprecated upstream: `fs.constants` + `os.constants.signals` |
662
- | `node:sys` | ✅ | — | Deprecated alias of `node:util` |
764
+ | API | Status | Probe | Notes |
765
+ | -------------------------------------- | :----: | ------------------------------------------------------------ | ------------------------------------------------------------ |
766
+ | `node:constants` (`F_OK`, `SIGINT`, …) | ✅ | [lib-node-perf-hooks.ts](conformance/lib-node-perf-hooks.ts) | Deprecated upstream: `fs.constants` + `os.constants.signals` |
767
+ | `node:sys` | ✅ | — | Deprecated alias of `node:util` |
663
768
 
664
769
  #### `node:events`
665
770
 
666
- | API | Status | Probe | Notes |
667
- | ---------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | -------------------------------------------------------------------------- |
668
- | `EventEmitter`: `on` / `once` / `off` / `prepend*` / `emit` / `removeAllListeners` / `listenerCount` / `eventNames` / max listeners / `newListener`; unhandled `'error'` throws | ✅ | [lib-node-events.ts](conformance/lib-node-events.ts) | Listeners are called with any signature; removal by identity |
669
- | `class X extends EventEmitter` | ✅ | [lib-node-events-extends.ts](conformance/lib-node-events-extends.ts) | The emitter is embedded; `this.emit` and inherited methods work |
670
- | `events.once` (→ promise) / `events.on` (async iterator) | ✅ | [lib-node-events-once.ts](conformance/lib-node-events-once.ts) | `'error'` rejects `once` |
671
- | `EventTarget` / `Event` / `AbortController` / `AbortSignal` (`abort`, `timeout`, `any`, `throwIfAborted`) | ✅ | [lib-node-abort.ts](conformance/lib-node-abort.ts) | Globals (also exported by `node:events`) |
672
- | `errorMonitor`, `captureRejections` (option and global), `getMaxListeners` / `setMaxListeners` (static), `addAbortListener` | ✅ | [lib-node-events-extra.ts](conformance/lib-node-events-extra.ts) | Captures rejections of listeners that return a promise; async arrow listeners run inline (their `await`s don't yield to `emit`) |
673
- | Symbol event names other than `errorMonitor`, `EventEmitterAsyncResource`, `Symbol.for('nodejs.rejection')` | ❌ | — | Event names are strings |
771
+ | API | Status | Probe | Notes |
772
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
773
+ | `EventEmitter`: `on` / `once` / `off` / `prepend*` / `emit` / `removeAllListeners` / `listenerCount` / `eventNames` / max listeners / `newListener`; unhandled `'error'` throws | ✅ | [lib-node-events.ts](conformance/lib-node-events.ts) | Listeners are called with any signature; removal by identity |
774
+ | `class X extends EventEmitter` | ✅ | [lib-node-events-extends.ts](conformance/lib-node-events-extends.ts) | The emitter is embedded; `this.emit` and inherited methods work |
775
+ | `events.once` (→ promise) / `events.on` (async iterator) | ✅ | [lib-node-events-once.ts](conformance/lib-node-events-once.ts) | `'error'` rejects `once` |
776
+ | `EventTarget` / `Event` / `AbortController` / `AbortSignal` (`abort`, `timeout`, `any`, `throwIfAborted`) | ✅ | [lib-node-abort.ts](conformance/lib-node-abort.ts) | Globals (also exported by `node:events`) |
777
+ | `errorMonitor`, `captureRejections` (option and global), `getMaxListeners` / `setMaxListeners` (static), `addAbortListener` | ✅ | [lib-node-events-extra.ts](conformance/lib-node-events-extra.ts) | Captures rejections of listeners that return a promise; async arrow listeners run inline (their `await`s don't yield to `emit`) |
778
+ | Symbol event names other than `errorMonitor`, `EventEmitterAsyncResource`, `Symbol.for('nodejs.rejection')` | ❌ | — | Event names are strings today; symbols are unique pointers, usable as listener keys, and `EventEmitterAsyncResource` fits on `AsyncResource` |
674
779
 
675
780
  #### `node:stream`
676
781
 
677
- | API | Status | Probe | Notes |
678
- | ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
679
- | `Readable` (`push`, `read`, `pause` / `resume`, `setEncoding`, `destroy`), `Readable.from`, `for await` | ✅ | [lib-node-stream-readable.ts](conformance/lib-node-stream-readable.ts) | Arrays, strings, Buffers and async generators as sources |
680
- | `Writable` (`write` / `end` / callbacks, `final`, `'finish'`, write after end) | ✅ | [lib-node-stream-writable.ts](conformance/lib-node-stream-writable.ts) | Strings become Buffers unless `decodeStrings: false` or `objectMode` |
681
- | `Transform` / `PassThrough` / `Duplex`, `pipe` chains, subclasses overriding `_transform` & co. | ✅ | [lib-node-stream-transform.ts](conformance/lib-node-stream-transform.ts) | Option methods (`transform`, `flush`, `write`, `final`, `read`) and `_`-overrides both work; `this` inside option methods is not the stream (use the callback) |
682
- | `pipeline` / `finished` / `stream/promises` / `stream/consumers` (`text`, `json`, `buffer`) | ✅ | [lib-node-stream-pipeline.ts](conformance/lib-node-stream-pipeline.ts) | Errors destroy the pipeline and reach the callback / rejection |
683
- | `Readable.toWeb` / `fromWeb`, `Writable.toWeb` / `fromWeb`, `Duplex.toWeb` / `fromWeb`, `compose` (Node and web streams) | ✅ | [lib-node-stream-web-bridge.ts](conformance/lib-node-stream-web-bridge.ts) | `toWeb` pauses the Node stream while the web queue is full |
684
- | Backpressure (`highWaterMark` beyond `write()`'s return value), `compose` with generator functions | ❌ | — | Not implemented |
782
+ | API | Status | Probe | Notes |
783
+ | ------------------------------------------------------------------------------------------------------------------------ | :----: | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
784
+ | `Readable` (`push`, `read`, `pause` / `resume`, `setEncoding`, `destroy`), `Readable.from`, `for await` | ✅ | [lib-node-stream-readable.ts](conformance/lib-node-stream-readable.ts) | Arrays, strings, Buffers and async generators as sources |
785
+ | `'readable'` events (paused mode), `read()` / `read(size)` | ✅ | [lib-node-stream-readable-event.ts](conformance/lib-node-stream-readable-event.ts) | A last `'readable'` (with `read()` giving `null`) comes before `'end'`; `read()` returns everything buffered, `read(n)` waits for `n` bytes unless the stream ended, and what it returns is also a `'data'` event. Chunk boundaries can differ from Node's read-ahead |
786
+ | `Writable` (`write` / `end` / callbacks, `final`, `'finish'`, write after end) | ✅ | [lib-node-stream-writable.ts](conformance/lib-node-stream-writable.ts) | Strings become Buffers unless `decodeStrings: false` or `objectMode` |
787
+ | `Transform` / `PassThrough` / `Duplex`, `pipe` chains, subclasses overriding `_transform` & co. | ✅ | [lib-node-stream-transform.ts](conformance/lib-node-stream-transform.ts) | Option methods (`transform`, `flush`, `write`, `final`, `read`) and `_`-overrides both work; `this` inside option methods is not the stream (use the callback) |
788
+ | `pipeline` / `finished` / `stream/promises` / `stream/consumers` (`text`, `json`, `buffer`) | ✅ | [lib-node-stream-pipeline.ts](conformance/lib-node-stream-pipeline.ts) | Errors destroy the pipeline and reach the callback / rejection |
789
+ | `Readable.toWeb` / `fromWeb`, `Writable.toWeb` / `fromWeb`, `Duplex.toWeb` / `fromWeb`, `compose` (Node and web streams) | ✅ | [lib-node-stream-web-bridge.ts](conformance/lib-node-stream-web-bridge.ts) | `toWeb` pauses the Node stream while the web queue is full |
790
+ | Backpressure (`highWaterMark` beyond `write()`'s return value), `compose` with generator functions | ❌ | — | Not implemented yet |
685
791
 
686
792
  #### `node:stream/web`
687
793
 
688
- | API | Status | Probe | Notes |
689
- | ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | --------------------------------------------------------------------- |
690
- | `ReadableStream` (underlying source `start` / `pull` / `cancel`, sync or async), `getReader()` → `read` / `releaseLock` / `cancel` / `closed`, `locked`, `cancel`, `tee`, `for await` / `values()`, `ReadableStream.from` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | Promise reactions run as microtasks on the event loop; an error ends `for await` with a throw |
691
- | `WritableStream` (sink `start` / `write` / `close` / `abort`), `getWriter()` → `write` / `close` / `abort` / `ready` / `closed` / `desiredSize` / `releaseLock`; controller `error` / `signal` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | Writes run one at a time; `ready` follows the queue's backpressure |
692
- | `TransformStream` (`transform` / `flush` / `start`, controller `enqueue` / `error` / `terminate`), `pipeThrough` / `pipeTo` (`preventClose` / `preventAbort` / `preventCancel` / `signal`) | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | A transform waits until its readable side wants more |
693
- | `CountQueuingStrategy` / `ByteLengthQueuingStrategy`, `{ highWaterMark, size }` strategies | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | |
694
- | `TextEncoderStream` / `TextDecoderStream` (characters split across chunks), `CompressionStream` / `DecompressionStream` (`gzip`, `deflate`, `deflate-raw`) | ✅ | [lib-node-stream-web-bridge.ts](conformance/lib-node-stream-web-bridge.ts) | Decompression decodes once the input ends |
695
- | BYOB readers (`getReader({ mode: 'byob' })` reads into a view), byte-stream controllers' `byobRequest`, transferring streams | ❌ | — | `getReader({ mode: 'byob' })` returns a default reader |
794
+ | API | Status | Probe | Notes |
795
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
796
+ | `ReadableStream` (underlying source `start` / `pull` / `cancel`, sync or async), `getReader()` → `read` / `releaseLock` / `cancel` / `closed`, `locked`, `cancel`, `tee`, `for await` / `values()`, `ReadableStream.from` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | Promise reactions run as microtasks on the event loop; an error ends `for await` with a throw |
797
+ | `WritableStream` (sink `start` / `write` / `close` / `abort`), `getWriter()` → `write` / `close` / `abort` / `ready` / `closed` / `desiredSize` / `releaseLock`; controller `error` / `signal` | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | Writes run one at a time; `ready` follows the queue's backpressure |
798
+ | `TransformStream` (`transform` / `flush` / `start`, controller `enqueue` / `error` / `terminate`), `pipeThrough` / `pipeTo` (`preventClose` / `preventAbort` / `preventCancel` / `signal`) | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | A transform waits until its readable side wants more |
799
+ | `CountQueuingStrategy` / `ByteLengthQueuingStrategy`, `{ highWaterMark, size }` strategies | ✅ | [lib-node-stream-web.ts](conformance/lib-node-stream-web.ts) | |
800
+ | `TextEncoderStream` / `TextDecoderStream` (characters split across chunks), `CompressionStream` / `DecompressionStream` (`gzip`, `deflate`, `deflate-raw`) | ✅ | [lib-node-stream-web-bridge.ts](conformance/lib-node-stream-web-bridge.ts) | Decompression decodes once the input ends |
801
+ | BYOB readers (`getReader({ mode: 'byob' })` reads into a view), byte-stream controllers' `byobRequest`, transferring streams | ❌ | — | `getReader({ mode: 'byob' })` returns a default reader |
696
802
 
697
803
  #### `node:readline`
698
804
 
699
- | API | Status | Probe | Notes |
700
- | --------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
701
- | `createInterface` (`'line'` / `'close'`, `question(q, cb)`, `prompt`, `close`, `for await`) | ✅ | [lib-node-readline.ts](conformance/lib-node-readline.ts) | Any readable stream as input (`process.stdin` included) |
702
- | `node:readline/promises` (`await rl.question(q)`) | ✅ | [lib-node-readline-promises.ts](conformance/lib-node-readline-promises.ts) | |
703
- | `question(prompt)` (synchronous) | ✅ | [lib-node-readline-question.ts](conformance/lib-node-readline-question.ts) | TypeNative extension (not in Node): used by the self-hosted compiler |
704
- | `cursorTo` / `moveCursor` / `clearLine` / `clearScreenDown` | ✅ | [lib-node-readline-cursor.ts](conformance/lib-node-readline-cursor.ts) | ANSI escape sequences written to the stream; optional callback |
705
- | `emitKeypressEvents`, `history`, `completer` | ❌ | — | Need raw terminal mode (OS-specific syscalls) |
805
+ | API | Status | Probe | Notes |
806
+ | ------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
807
+ | `createInterface` (`'line'` / `'close'`, `question(q, cb)`, `prompt`, `close`, `for await`) | ✅ | [lib-node-readline.ts](conformance/lib-node-readline.ts) | Any readable stream as input (`process.stdin` included) |
808
+ | `node:readline/promises` (`await rl.question(q)`) | ✅ | [lib-node-readline-promises.ts](conformance/lib-node-readline-promises.ts) | |
809
+ | `question(prompt)` (synchronous) | ✅ | [lib-node-readline-question.ts](conformance/lib-node-readline-question.ts) | TypeNative extension (not in Node): used by the self-hosted compiler |
810
+ | `cursorTo` / `moveCursor` / `clearLine` / `clearScreenDown` | ✅ | [lib-node-readline-cursor.ts](conformance/lib-node-readline-cursor.ts) | ANSI escape sequences written to the stream; optional callback |
811
+ | `emitKeypressEvents(stream)` (`'keypress'` with `(str, key)`) | ✅ | [lib-node-readline-keypress.ts](conformance/lib-node-readline-keypress.ts) | A port of Node's key decoder: names, `ctrl` / `meta` / `shift`, xterm / rxvt / putty sequences, Escape after 500 ms. `str` is `""` (not `undefined`) for escape sequences, and so are `name` / `code` when Node leaves them out |
812
+ | `Interface` line editing, `history`, `completer` | ❌ | — | Feasible: keypresses and raw mode exist; needs the terminal-mode line editor on top |
706
813
 
707
814
  #### `node:child_process`
708
815
 
709
- | API | Status | Probe | Notes |
710
- | ------------------------------------------------------------------------------------------------ | :----: | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
711
- | `execSync` / `execFileSync` / `spawnSync` (`encoding`, `input`, `cwd`, `env`, `shell`, `stdio: 'inherit'`) | ✅ | [lib-node-child-process-sync.ts](conformance/lib-node-child-process-sync.ts) | Buffers unless an encoding is given (as in Node); a non-zero exit throws with `status` / `stdout` / `stderr` |
712
- | `exec` / `execFile` (callbacks), `spawn` → `ChildProcess` (stdio streams, `'exit'` / `'close'`, `kill`); `promisify(exec)` | ✅ | [lib-node-child-process-async.ts](conformance/lib-node-child-process-async.ts) | `'close'` follows the end of the stdio streams being read; exit codes on `err.code` |
713
- | `fork(modulePath, args, { env, cwd, silent })` → `send` / `'message'` / `disconnect` / `'disconnect'` / `connected`; in the child `process.send` / `process.on('message')` / `process.connected` / `process.disconnect` | ✅ | [lib-node-child-process-fork.ts](conformance/lib-node-child-process-fork.ts) | The child is this program run again (branch on `process.argv` / `process.send`), linked over loopback TCP; messages are structured clones (a superset of Node's default JSON) |
714
- | `detached`, `stdio` arrays beyond stdout, `serialization: 'advanced'` handle passing (`send(msg, socket)`), forking another file | ❌ | — | `detached` needs OS-specific process attributes; one binary holds one program |
816
+ | API | Status | Probe | Notes |
817
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
818
+ | `execSync` / `execFileSync` / `spawnSync` (`encoding`, `input`, `cwd`, `env`, `shell`, `stdio: 'inherit'`) | ✅ | [lib-node-child-process-sync.ts](conformance/lib-node-child-process-sync.ts) | Buffers unless an encoding is given (as in Node); a non-zero exit throws with `status` / `stdout` / `stderr` |
819
+ | `exec` / `execFile` (callbacks), `spawn` → `ChildProcess` (stdio streams, `'exit'` / `'close'`, `kill`); `promisify(exec)` | ✅ | [lib-node-child-process-async.ts](conformance/lib-node-child-process-async.ts) | `'close'` follows the end of the stdio streams being read; exit codes on `err.code` |
820
+ | `fork(modulePath, args, { env, cwd, silent })` → `send` / `'message'` / `disconnect` / `'disconnect'` / `connected`; in the child `process.send` / `process.on('message')` / `process.connected` / `process.disconnect` | ✅ | [lib-node-child-process-fork.ts](conformance/lib-node-child-process-fork.ts) | The child is this program run again (branch on `process.argv` / `process.send`), linked over loopback TCP; messages are structured clones (a superset of Node's default JSON) |
821
+ | `spawn` `detached`, `child.unref()` / `ref()` | ✅ | [lib-node-child-process-detached.ts](conformance/lib-node-child-process-detached.ts) | A new session (`setsid`) on Unix; `DETACHED_PROCESS \| CREATE_NEW_PROCESS_GROUP` on Windows, as libuv does. An unref'ed child's stdio pipes don't keep the parent alive either |
822
+ | `fork('./child.ts')` (another file) | ✅ | [lib-node-worker-entry.ts](conformance/lib-node-worker-entry.ts) | As for workers: a second entry point of the binary |
823
+ | `stdio` arrays beyond stdout | ❌ | — | Extra `stdio` entries are `ExtraFiles` |
824
+ | `serialization: 'advanced'` handle passing (`send(msg, socket)`) | ❌ | — | Needs file-descriptor passing over the IPC channel (`SCM_RIGHTS` on Unix) |
715
825
 
716
826
  #### `node:cluster`
717
827
 
718
- | API | Status | Probe | Notes |
719
- | ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | --------------------------------------------------------------------- |
720
- | `isPrimary` / `isWorker` / `isMaster`, `fork(env)`, `workers`, `worker`, `setupPrimary` / `settings`, `disconnect(cb)`, `SCHED_RR` / `schedulingPolicy`; events `'fork'` / `'online'` / `'listening'` / `'message'` / `'disconnect'` / `'exit'` | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | Workers are this program run again with `NODE_UNIQUE_ID` set |
721
- | `Worker` (`id`, `process`, `send`, `'message'`, `disconnect`, `kill`, `isConnected`, `isDead`, `exitedAfterDisconnect`); `process.send` from workers | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | |
722
- | Shared ports: `net` / `http` / `https` / `tls` servers in workers listen on one port (also `listen(0)`), connections round-robin | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | The primary owns the listener and relays each connection to a worker's private loopback listener with the client's address (no handle passing) |
723
- | `SCHED_NONE` (OS-level balancing), `exclusive: true` listeners, dgram sockets in workers | ❌ | — | Everything goes through the primary |
828
+ | API | Status | Probe | Notes |
829
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
830
+ | `isPrimary` / `isWorker` / `isMaster`, `fork(env)`, `workers`, `worker`, `setupPrimary` / `settings`, `disconnect(cb)`, `SCHED_RR` / `schedulingPolicy`; events `'fork'` / `'online'` / `'listening'` / `'message'` / `'disconnect'` / `'exit'` | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | Workers are this program run again with `NODE_UNIQUE_ID` set |
831
+ | `Worker` (`id`, `process`, `send`, `'message'`, `disconnect`, `kill`, `isConnected`, `isDead`, `exitedAfterDisconnect`); `process.send` from workers | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | |
832
+ | Shared ports: `net` / `http` / `https` / `tls` servers in workers listen on one port (also `listen(0)`), connections round-robin | ✅ | [lib-node-cluster.ts](conformance/lib-node-cluster.ts) | The primary owns the listener and relays each connection to a worker's private loopback listener with the client's address (no handle passing) |
833
+ | `SCHED_NONE` (OS-level balancing), `exclusive: true` listeners, dgram sockets in workers | ❌ | — | Everything goes through the primary today; `SO_REUSEPORT` or handle passing would remove it |
724
834
 
725
835
  #### `node:diagnostics_channel`
726
836
 
727
- | API | Status | Probe | Notes |
728
- | ------------------------------------------------------------------------------------ | :----: | ---------------------------------------------------------------------------- | ----------------------------- |
729
- | `channel` / `publish` / `subscribe` / `unsubscribe` / `hasSubscribers` | ✅ | [lib-node-diagnostics-channel.ts](conformance/lib-node-diagnostics-channel.ts) | Synchronous; shared by name |
730
- | `tracingChannel` (`start` / `end` / `asyncStart` / `asyncEnd` / `error` channels, `subscribe` / `unsubscribe`, `traceSync` / `tracePromise` / `traceCallback`); `channel.bindStore` / `unbindStore` / `runStores` | ✅ | [lib-node-diagnostics-tracing.ts](conformance/lib-node-diagnostics-tracing.ts) | The context gets `result` / `error`; a struct context without those fields is copied into a record |
837
+ | API | Status | Probe | Notes |
838
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
839
+ | `channel` / `publish` / `subscribe` / `unsubscribe` / `hasSubscribers` | ✅ | [lib-node-diagnostics-channel.ts](conformance/lib-node-diagnostics-channel.ts) | Synchronous; shared by name |
840
+ | `tracingChannel` (`start` / `end` / `asyncStart` / `asyncEnd` / `error` channels, `subscribe` / `unsubscribe`, `traceSync` / `tracePromise` / `traceCallback`); `channel.bindStore` / `unbindStore` / `runStores` | ✅ | [lib-node-diagnostics-tracing.ts](conformance/lib-node-diagnostics-tracing.ts) | The context gets `result` / `error`; a struct context without those fields is copied into a record |
731
841
 
732
842
  #### `node:net`
733
843
 
734
- | API | Status | Probe | Notes |
735
- | ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | ----------------------------------------------------------------------------------------- |
736
- | `createServer` / `Server` (`listen` forms incl. `{ port, host }` and Unix paths, `address()`, `close(cb)`, `getConnections`, `maxConnections`, `ref` / `unref`; `'listening'` / `'connection'` / `'close'` / `'error'`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | A listening server keeps the process alive; `close()` emits `'close'` once its connections end |
737
- | `connect` / `createConnection` / `Socket` (a duplex stream: `write` / `end` / `'data'` / `'end'`, `setEncoding`, `remoteAddress` / `remotePort` / `localPort`, `setTimeout` + `'timeout'`, `setNoDelay`, `setKeepAlive`, `destroy`, `'close'(hadError)`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | One goroutine reads the `net.Conn`; `allowHalfOpen: false` ends the socket after `'end'`, as in Node |
738
- | Node's errors (`connect ECONNREFUSED 127.0.0.1:80`, `EADDRINUSE`, `ECONNRESET`; `code` / `errno` / `syscall` / `address` / `port`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | |
739
- | `isIP` / `isIPv4` / `isIPv6` | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | |
740
- | `BlockList` (`addAddress` / `addRange` / `addSubnet` / `check` / `rules` / `isBlockList`) / `SocketAddress` (`parse`, `toJSON`) | ✅ | [lib-node-net-blocklist.ts](conformance/lib-node-net-blocklist.ts) | `net/netip`; IPv4-mapped IPv6 addresses match IPv4 rules, as in Node |
741
- | `net.Stream`, `get/setDefaultAutoSelectFamily(AttemptTimeout)` | ✅ | [lib-node-net-blocklist.ts](conformance/lib-node-net-blocklist.ts) | Go's dialer always races IPv4 / IPv6, so the settings are reported but not used |
742
- | IPC handle passing (`send(msg, socket)`) | ❌ | — | Needs file-descriptor passing over the IPC channel |
844
+ | API | Status | Probe | Notes |
845
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
846
+ | `createServer` / `Server` (`listen` forms incl. `{ port, host }` and Unix paths, `address()`, `close(cb)`, `getConnections`, `maxConnections`, `ref` / `unref`; `'listening'` / `'connection'` / `'close'` / `'error'`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | A listening server keeps the process alive; `close()` emits `'close'` once its connections end |
847
+ | `connect` / `createConnection` / `Socket` (a duplex stream: `write` / `end` / `'data'` / `'end'`, `setEncoding`, `remoteAddress` / `remotePort` / `localPort`, `setTimeout` + `'timeout'`, `setNoDelay`, `setKeepAlive`, `destroy`, `'close'(hadError)`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | One goroutine reads the `net.Conn`; `allowHalfOpen: false` ends the socket after `'end'`, as in Node |
848
+ | Node's errors (`connect ECONNREFUSED 127.0.0.1:80`, `EADDRINUSE`, `ECONNRESET`; `code` / `errno` / `syscall` / `address` / `port`) | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | |
849
+ | `isIP` / `isIPv4` / `isIPv6` | ✅ | [lib-node-net.ts](conformance/lib-node-net.ts) | |
850
+ | `BlockList` (`addAddress` / `addRange` / `addSubnet` / `check` / `rules` / `isBlockList`) / `SocketAddress` (`parse`, `toJSON`) | ✅ | [lib-node-net-blocklist.ts](conformance/lib-node-net-blocklist.ts) | `net/netip`; IPv4-mapped IPv6 addresses match IPv4 rules, as in Node |
851
+ | `net.Stream`, `get/setDefaultAutoSelectFamily(AttemptTimeout)` | ✅ | [lib-node-net-blocklist.ts](conformance/lib-node-net-blocklist.ts) | Go's dialer always races IPv4 / IPv6, so the settings are reported but not used |
852
+ | IPC handle passing (`send(msg, socket)`) | ❌ | — | Needs file-descriptor passing over the IPC channel |
743
853
 
744
854
  #### `node:dns`
745
855
 
746
- | API | Status | Probe | Notes |
747
- | -------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | --------------------------------------------------------------------- |
748
- | `lookup` (`family`, `all`) and `dns/promises` / `dns.promises` `lookup` | ✅ | [lib-node-dns.ts](conformance/lib-node-dns.ts) | Go's resolver; `getaddrinfo ENOTFOUND host` errors with `hostname` |
749
- | `resolve` (rrtype) / `resolve4` / `resolve6` / `resolveCname` / `resolveMx` / `resolveTxt` / `resolveNs` / `resolveSrv` / `reverse` (callback and promise forms), `getServers` | ✅ | — | Implemented, not probed (needs a network); `getServers` reads `/etc/resolv.conf` |
750
- | `Resolver` class (callback and `dns/promises` forms: `setServers` / `getServers` / `setLocalAddress` / `cancel`, `timeout` option), module `setServers`, `lookupService` | ✅ | [lib-node-dns-resolver.ts](conformance/lib-node-dns-resolver.ts) | Go's pure resolver dialing the configured servers in turn; `ETIMEOUT` / `ECANCELLED`; services from `/etc/services` |
751
- | `resolveAny` / `resolveCaa` / `resolveNaptr` / `resolvePtr` / `resolveSoa`, the `ttl` option, `tries` | ❌ | — | Go's resolver does not expose these records or TTLs |
856
+ | API | Status | Probe | Notes |
857
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
858
+ | `lookup` (`family`, `all`) and `dns/promises` / `dns.promises` `lookup` | ✅ | [lib-node-dns.ts](conformance/lib-node-dns.ts) | Go's resolver; `getaddrinfo ENOTFOUND host` errors with `hostname` |
859
+ | `resolve` (rrtype) / `resolve4` / `resolve6` / `resolveCname` / `resolveMx` / `resolveTxt` / `resolveNs` / `resolveSrv` / `reverse` (callback and promise forms), `getServers` | ✅ | — | Implemented, not probed (needs a network); `getServers` reads `/etc/resolv.conf` |
860
+ | `Resolver` class (callback and `dns/promises` forms: `setServers` / `getServers` / `setLocalAddress` / `cancel`, `timeout` option), module `setServers`, `lookupService` | ✅ | [lib-node-dns-resolver.ts](conformance/lib-node-dns-resolver.ts) | Go's pure resolver dialing the configured servers in turn; `ETIMEOUT` / `ECANCELLED`; services from `/etc/services` |
861
+ | `resolveAny` / `resolveCaa` / `resolveNaptr` / `resolvePtr` / `resolveSoa` (and `resolve(name, rrtype)` for them), `resolve4` / `resolve6` `{ ttl: true }`, the `tries` option | ✅ | [lib-node-dns-records.ts](conformance/lib-node-dns-records.ts) | Queries built and parsed with `golang.org/x/net/dns/dnsmessage`, copied from GOROOT like `x/text`: UDP with EDNS0, TCP when truncated, each server in turn `tries` times (default 4, 5 s each). Errors are Node's (`queryX ENOTFOUND host`, `ENODATA`, `ESERVFAIL`, `EREFUSED`, `ETIMEOUT`, `ECANCELLED`); `resolveAny` groups records by type in Node's order |
752
862
 
753
863
  #### `node:http` / `node:https`
754
864
 
755
- | API | Status | Probe | Notes |
756
- | ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
757
- | `createServer((req, res) => …)` / `'request'`; `IncomingMessage` (a Readable: `method`, `url`, `headers`, `headersDistinct`, `rawHeaders`, `httpVersion`, `socket.remoteAddress`) | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | Go's `net/http` serves the connections; bodies stream into the request |
758
- | `ServerResponse` (a Writable: `statusCode`, `setHeader` / `getHeader` / `getHeaders` / `hasHeader` / `removeHeader` / `appendHeader`, `writeHead`, `write`, `end`, `headersSent`, `'finish'`) | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | `end(data)` without earlier writes sends a `Content-Length`; `write()` streams a chunked body |
759
- | `request` / `get` (URL strings, `URL` objects, options: `hostname` / `port` / `path` / `method` / `headers` / `auth` / `timeout` / `signal` / `socketPath`); `ClientRequest` (`setHeader`, `write`, `end`, `destroy`, `'response'`, `'error'`, `'timeout'`) | ✅ | [lib-node-http-client.ts](conformance/lib-node-http-client.ts) | No redirects are followed and bodies are not decompressed, as in Node; `destroy()` before a response fails with `socket hang up` |
760
- | `STATUS_CODES` / `METHODS` / `maxHeaderSize` / `Agent` / `globalAgent` | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | `Agent` options are accepted; Go's transport pools connections |
761
- | `https.createServer({ key, cert })` / `https.request` / `https.get` (`ca`, `rejectUnauthorized`, `servername`, client `key` / `cert`) | ✅ | [lib-node-https.ts](conformance/lib-node-https.ts) | Certificate checks as in [node:tls](#nodetls) |
762
- | `headers` values | ✅ | [lib-node-http-client.ts](conformance/lib-node-http-client.ts) | Repeated headers are joined with `, ` (`; ` for `cookie`) — including `set-cookie`, which Node keeps as an array: use `headersDistinct['set-cookie']` |
763
- | Server `'upgrade'` / `'connect'` (`req, socket, head`) and client `'upgrade'` / `'connect'` events | ✅ | [lib-node-http-upgrade.ts](conformance/lib-node-http-upgrade.ts) | The server hijacks the connection; an upgrade nobody listens for is an ordinary request, an unhandled CONNECT closes the connection, as in Node |
764
- | `statusMessage` on responses we send, `'checkContinue'`, `Agent` socket pooling control, trailers we send | ❌ | — | Go's `ResponseWriter` sends its standard reason phrases |
865
+ | API | Status | Probe | Notes |
866
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
867
+ | `createServer((req, res) => …)` / `'request'`; `IncomingMessage` (a Readable: `method`, `url`, `headers`, `headersDistinct`, `rawHeaders`, `httpVersion`, `socket.remoteAddress`) | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | Go's `net/http` serves the connections; bodies stream into the request |
868
+ | `ServerResponse` (a Writable: `statusCode`, `setHeader` / `getHeader` / `getHeaders` / `hasHeader` / `removeHeader` / `appendHeader`, `writeHead`, `write`, `end`, `headersSent`, `'finish'`) | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | `end(data)` without earlier writes sends a `Content-Length`; `write()` streams a chunked body |
869
+ | `request` / `get` (URL strings, `URL` objects, options: `hostname` / `port` / `path` / `method` / `headers` / `auth` / `timeout` / `signal` / `socketPath`); `ClientRequest` (`setHeader`, `write`, `end`, `destroy`, `'response'`, `'error'`, `'timeout'`) | ✅ | [lib-node-http-client.ts](conformance/lib-node-http-client.ts) | No redirects are followed and bodies are not decompressed, as in Node; `destroy()` before a response fails with `socket hang up` |
870
+ | `STATUS_CODES` / `METHODS` / `maxHeaderSize` / `Agent` / `globalAgent` | ✅ | [lib-node-http-server.ts](conformance/lib-node-http-server.ts) | `Agent` options are accepted; Go's transport pools connections |
871
+ | `https.createServer({ key, cert })` / `https.request` / `https.get` (`ca`, `rejectUnauthorized`, `servername`, client `key` / `cert`) | ✅ | [lib-node-https.ts](conformance/lib-node-https.ts) | Certificate checks as in [node:tls](#nodetls) |
872
+ | `headers` values | ✅ | [lib-node-http-client.ts](conformance/lib-node-http-client.ts) | Repeated headers are joined with `, ` (`; ` for `cookie`) — including `set-cookie`, which Node keeps as an array: use `headersDistinct['set-cookie']` |
873
+ | Server `'upgrade'` / `'connect'` (`req, socket, head`) and client `'upgrade'` / `'connect'` events | ✅ | [lib-node-http-upgrade.ts](conformance/lib-node-http-upgrade.ts) | The server hijacks the connection; an upgrade nobody listens for is an ordinary request, an unhandled CONNECT closes the connection, as in Node |
874
+ | `res.addTrailers()` | ✅ | [lib-node-http-trailers.ts](conformance/lib-node-http-trailers.ts) | Sent after a chunked body, as in Node (not with a `Content-Length`); clients read them as `res.trailers` |
875
+ | Trailers on client requests, `Agent` socket pooling control | ❌ | — | Feasible: Go's `Request.Trailer`, `Transport.MaxConnsPerHost` / `MaxIdleConnsPerHost` |
876
+ | `statusMessage` on responses we send, `'checkContinue'` | ❌ | — | Go's `ResponseWriter` sends its standard reason phrases and answers `100-continue` itself: needs a hijacked connection |
765
877
 
766
878
  #### `node:http2`
767
879
 
768
- | API | Status | Probe | Notes |
769
- | ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------- | --------------------------------------------------------------------- |
770
- | `createServer` (cleartext h2c) / `createSecureServer({ key, cert, allowHTTP1 })`; `'stream'` → `ServerHttp2Stream` (`respond`, `write` / `end`, `respondWithFile`, `close`, a Duplex over the request body) with `:method` / `:path` / `:scheme` / `:authority` headers | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts), [lib-node-http2-secure.ts](conformance/lib-node-http2-secure.ts) | On `net/http`'s HTTP/2 (`http.Protocols`) |
771
- | Compatibility API: `(req, res)` handlers get `Http2ServerRequest` / `Http2ServerResponse` (`httpVersion` `'2.0'`, pseudo-headers in `req.headers`) | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts) | The node:http objects |
772
- | `connect(authority, { ca, rejectUnauthorized, servername })` → `ClientHttp2Session` (`request`, `close`, `destroy`, `'connect'` / `'error'` / `'close'`, `alpnProtocol`, `encrypted`); `ClientHttp2Stream` (`'response'` with `:status`, body as a Readable, request bodies) | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts), [lib-node-http2-secure.ts](conformance/lib-node-http2-secure.ts) | Connection failures error the session and cancel its streams (`ERR_HTTP2_STREAM_CANCEL`); request bodies are sent once the writable side ends |
773
- | `constants`, `getDefaultSettings` | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts) | |
774
- | Server push, `ping`, `settings` / `goaway` / `altsvc`, `'session'` events, `getPackedSettings`, upgrades from HTTP/1 | ❌ | — | Go's standard library does not expose HTTP/2 frames |
880
+ | API | Status | Probe | Notes |
881
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
882
+ | `createServer` (cleartext h2c) / `createSecureServer({ key, cert, allowHTTP1 })`; `'stream'` → `ServerHttp2Stream` (`respond`, `write` / `end`, `respondWithFile`, `close`, a Duplex over the request body) with `:method` / `:path` / `:scheme` / `:authority` headers | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts), [lib-node-http2-secure.ts](conformance/lib-node-http2-secure.ts) | On `net/http`'s HTTP/2 (`http.Protocols`) |
883
+ | Compatibility API: `(req, res)` handlers get `Http2ServerRequest` / `Http2ServerResponse` (`httpVersion` `'2.0'`, pseudo-headers in `req.headers`) | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts) | The node:http objects |
884
+ | `connect(authority, { ca, rejectUnauthorized, servername })` → `ClientHttp2Session` (`request`, `close`, `destroy`, `'connect'` / `'error'` / `'close'`, `alpnProtocol`, `encrypted`); `ClientHttp2Stream` (`'response'` with `:status`, body as a Readable, request bodies) | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts), [lib-node-http2-secure.ts](conformance/lib-node-http2-secure.ts) | Connection failures error the session and cancel its streams (`ERR_HTTP2_STREAM_CANCEL`); request bodies are sent once the writable side ends |
885
+ | `constants`, `getDefaultSettings` | ✅ | [lib-node-http2.ts](conformance/lib-node-http2.ts) | |
886
+ | `ping`, `settings` / `goaway` / `altsvc`, `'session'` events, `getPackedSettings`, upgrades from HTTP/1 | ❌ | — | Go's bundled HTTP/2 hides frames: needs a vendored `golang.org/x/net/http2` |
887
+ | Server push | 🚫 | — | Deprecated (browsers removed it); Go's server doesn't push |
775
888
 
776
889
  #### `node:tls`
777
890
 
778
- | API | Status | Probe | Notes |
779
- | ----------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------- | ------------------------------------------------------------------------------------------- |
780
- | `createServer({ key, cert, ca, requestCert, ALPNProtocols, minVersion, maxVersion }, cb)` / `'secureConnection'` | ✅ | [lib-node-tls.ts](conformance/lib-node-tls.ts) | Handshakes run on the accept goroutine |
781
- | `connect` (`host`, `port`, `ca`, `servername`, `rejectUnauthorized`, client `key` / `cert`) / `'secureConnect'`; `TLSSocket` (`authorized`, `authorizationError`, `encrypted`, `alpnProtocol`, `getPeerCertificate`, `getProtocol`, `getCipher`) | ✅ | [lib-node-tls.ts](conformance/lib-node-tls.ts) | Node's verification codes: `DEPTH_ZERO_SELF_SIGNED_CERT`, `SELF_SIGNED_CERT_IN_CHAIN`, `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`, `CERT_HAS_EXPIRED`, `ERR_TLS_CERT_ALTNAME_INVALID` |
782
- | `createSecureContext` / `getCiphers` / `DEFAULT_MIN_VERSION` / `DEFAULT_MAX_VERSION` | ✅ | — | Implemented, not probed; cipher names are Go's |
783
- | `checkServerIdentity` (function and `connect` option) | ✅ | [lib-node-tls-identity.ts](conformance/lib-node-tls-identity.ts) | Node's rules: one leftmost wildcard label, IP altnames, CN only without DNS altnames |
784
- | PFX / passphrase-protected keys, session resumption, `renegotiate`, `rootCertificates` | ❌ | — | Not implemented |
891
+ | API | Status | Probe | Notes |
892
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
893
+ | `createServer({ key, cert, ca, requestCert, ALPNProtocols, minVersion, maxVersion }, cb)` / `'secureConnection'` | ✅ | [lib-node-tls.ts](conformance/lib-node-tls.ts) | Handshakes run on the accept goroutine |
894
+ | `connect` (`host`, `port`, `ca`, `servername`, `rejectUnauthorized`, client `key` / `cert`) / `'secureConnect'`; `TLSSocket` (`authorized`, `authorizationError`, `encrypted`, `alpnProtocol`, `getPeerCertificate`, `getProtocol`, `getCipher`) | ✅ | [lib-node-tls.ts](conformance/lib-node-tls.ts) | Node's verification codes: `DEPTH_ZERO_SELF_SIGNED_CERT`, `SELF_SIGNED_CERT_IN_CHAIN`, `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`, `CERT_HAS_EXPIRED`, `ERR_TLS_CERT_ALTNAME_INVALID` |
895
+ | `createSecureContext` / `getCiphers` / `DEFAULT_MIN_VERSION` / `DEFAULT_MAX_VERSION` | ✅ | — | Implemented, not probed; cipher names are Go's |
896
+ | `checkServerIdentity` (function and `connect` option) | ✅ | [lib-node-tls-identity.ts](conformance/lib-node-tls-identity.ts) | Node's rules: one leftmost wildcard label, IP altnames, CN only without DNS altnames |
897
+ | PFX / passphrase-protected keys, session resumption, `renegotiate`, `rootCertificates` | ❌ | — | Not implemented yet: PFX needs a PKCS#12 decoder; `rootCertificates` can embed Mozilla's bundle (as Node does); Go has session tickets (`ClientSessionCache`) and client-side renegotiation |
785
898
 
786
899
  #### `node:dgram`
787
900
 
788
- | API | Status | Probe | Notes |
789
- | ----------------------------------------------------------------------------------------- | :----: | ---------------------------------------------- | --------------------------------------------- |
790
- | `createSocket('udp4' \| 'udp6' \| { type })`, `bind`, `send` (offset / length forms, callback), `'message'(msg, rinfo)`, `address`, `close`, `connect` / `disconnect` / `remoteAddress`, `ref` / `unref` | ✅ | [lib-node-dgram.ts](conformance/lib-node-dgram.ts) | `send` binds an unbound socket first, as in Node |
791
- | Multicast membership, `setBroadcast` / `setTTL` effects | ❌ | — | Accepted without effect |
901
+ | API | Status | Probe | Notes |
902
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
903
+ | `createSocket('udp4' \| 'udp6' \| { type })`, `bind`, `send` (offset / length forms, callback), `'message'(msg, rinfo)`, `address`, `close`, `connect` / `disconnect` / `remoteAddress`, `ref` / `unref` | ✅ | [lib-node-dgram.ts](conformance/lib-node-dgram.ts) | `send` binds an unbound socket first, as in Node |
904
+ | `addMembership` / `dropMembership`, `setMulticastInterface` / `setMulticastTTL` / `setMulticastLoopback`, `setBroadcast`, `setTTL` | ✅ | [lib-node-dgram-multicast.ts](conformance/lib-node-dgram-multicast.ts) | `setsockopt` on the socket per OS (Linux, macOS, the BSDs, Windows). Options before `bind()` throw `EBADF` and membership binds an unbound socket, as in Node |
905
+ | `addSourceSpecificMembership` / `dropSourceSpecificMembership` | ❌ | — | Feasible: `IP_ADD_SOURCE_MEMBERSHIP`, whose struct layout differs per OS |
792
906
 
793
907
  #### `fetch`
794
908
 
795
- | API | Status | Probe | Notes |
796
- | ----------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------ | ------------------------------------------------------------------------------------------ |
797
- | `fetch(url \| Request, { method, headers, body, redirect, signal })`; `Response` (`status`, `ok`, `statusText`, `headers`, `url`, `redirected`, `text()` / `json()` / `bytes()` / `arrayBuffer()`, `clone()`, `Response.json` / `error` / `redirect`) | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | Follows redirects (`manual` / `error` too); gzip bodies are decompressed; failures reject with `TypeError('fetch failed')` whose `cause` is the system error; aborts reject with `AbortError` |
798
- | `Headers` (`get` / `set` / `append` / `has` / `delete` / `forEach` / `entries` / `getSetCookie`, `for...of`) / `Request` | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | Names are lower-cased and iterated in sorted order |
799
- | Streaming bodies: `response.body` / `request.body` as `ReadableStream`s, `ReadableStream` request bodies (`duplex: 'half'`), `clone()` tees the body | ✅ | [lib-node-fetch-stream.ts](conformance/lib-node-fetch-stream.ts) | Network bodies are read a chunk per pull |
800
- | `Blob` / `FormData` bodies (multipart encoding), `blob()` / `formData()` (multipart and urlencoded) | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts), [lib-node-fetch-stream.ts](conformance/lib-node-fetch-stream.ts) | |
801
- | The Fetch standard's bad-port list (also on redirects) | ✅ | [lib-node-fetch-bad-port.ts](conformance/lib-node-fetch-bad-port.ts) | `TypeError: fetch failed` with cause `bad port` |
909
+ | API | Status | Probe | Notes |
910
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
911
+ | `fetch(url \| Request, { method, headers, body, redirect, signal })`; `Response` (`status`, `ok`, `statusText`, `headers`, `url`, `redirected`, `text()` / `json()` / `bytes()` / `arrayBuffer()`, `clone()`, `Response.json` / `error` / `redirect`) | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | Follows redirects (`manual` / `error` too); gzip bodies are decompressed; failures reject with `TypeError('fetch failed')` whose `cause` is the system error; aborts reject with `AbortError` |
912
+ | `Headers` (`get` / `set` / `append` / `has` / `delete` / `forEach` / `entries` / `getSetCookie`, `for...of`) / `Request` | ✅ | [lib-node-fetch.ts](conformance/lib-node-fetch.ts) | Names are lower-cased and iterated in sorted order |
913
+ | Streaming bodies: `response.body` / `request.body` as `ReadableStream`s, `ReadableStream` request bodies (`duplex: 'half'`), `clone()` tees the body | ✅ | [lib-node-fetch-stream.ts](conformance/lib-node-fetch-stream.ts) | Network bodies are read a chunk per pull |
914
+ | `Blob` / `FormData` bodies (multipart encoding), `blob()` / `formData()` (multipart and urlencoded) | ✅ | [lib-node-blob.ts](conformance/lib-node-blob.ts), [lib-node-fetch-stream.ts](conformance/lib-node-fetch-stream.ts) | |
915
+ | The Fetch standard's bad-port list (also on redirects) | ✅ | [lib-node-fetch-bad-port.ts](conformance/lib-node-fetch-bad-port.ts) | `TypeError: fetch failed` with cause `bad port` |
802
916
 
803
917
  #### `node:async_hooks`
804
918
 
805
- | API | Status | Probe | Notes |
806
- | ---------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
807
- | `AsyncLocalStorage` (`run`, `getStore`, `enterWith`, `exit`, `disable`, static `bind` / `snapshot`) | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | The store follows timers, `setImmediate`, `nextTick`, microtasks, promise callbacks, `await`, async function bodies, fs / dns callbacks; streams, sockets and servers emit in the context they were created / listened in |
808
- | `AsyncResource` (`runInAsyncScope`, `bind`, `asyncId`, static `bind`) | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | Captures the context it is created in |
809
- | `createHook` callbacks (`init` / `before` / `after` / `destroy`), real `executionAsyncId` / `triggerAsyncId` | ❌ | — | `createHook` is accepted but never calls back; ids are always `1` / `0` |
919
+ | API | Status | Probe | Notes |
920
+ | ------------------------------------------------------------------------------------------------------------ | :----: | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
921
+ | `AsyncLocalStorage` (`run`, `getStore`, `enterWith`, `exit`, `disable`, static `bind` / `snapshot`) | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | The store follows timers, `setImmediate`, `nextTick`, microtasks, promise callbacks, `await`, async function bodies, fs / dns callbacks; streams, sockets and servers emit in the context they were created / listened in |
922
+ | `AsyncResource` (`runInAsyncScope`, `bind`, `asyncId`, static `bind`) | ✅ | [lib-node-async-hooks.ts](conformance/lib-node-async-hooks.ts) | Captures the context it is created in |
923
+ | `createHook` callbacks (`init` / `before` / `after` / `destroy`), real `executionAsyncId` / `triggerAsyncId` | ❌ | — | `createHook` is accepted but never calls back; ids are always `1` / `0`. Feasible: the event loop's `TnAsyncSnapshot` / `TnAsyncRun` are where the callbacks would fire |
810
924
 
811
925
  #### `node:test`
812
926
 
813
- | API | Status | Probe | Notes |
814
- | ---------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
815
- | `test` / `it` / `describe` / `suite` (+ `.skip` / `.todo` / `.only`; `skip` / `todo` / `timeout` options); sync, async and `done`-callback tests | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Tests run one after another once the main module has finished, as in Node |
816
- | `before` / `after` / `beforeEach` / `afterEach` (file and suite level, `t.before` & co.) | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Node's order: outer `beforeEach` first, inner `afterEach` first |
817
- | `TestContext`: `t.test` subtests, `t.skip`, `t.todo`, `t.diagnostic`, `t.plan`, `t.name`, `t.fullName`, `t.signal`, `t.mock` | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | |
818
- | Reporting: TAP (Node's default when stdout is not a terminal) / spec (on a terminal); `tests` / `suites` / `pass` / `fail` / `cancelled` / `skipped` / `todo` counters; exit code 1 on failure | ✅ | [lib-node-test-fail.ts](conformance/lib-node-test-fail.ts) | Same layout as Node, without `location` / `stack` (a native binary has no source positions); timeouts count as cancelled |
819
- | `mock.fn(original?, implementation?)`; `fn.mock.calls` / `callCount()` / `mockImplementation(Once)` / `resetCalls()` / `restore()` | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | The mock has the original's Go function type |
820
- | `t.assert` (`node:assert`'s functions, counted by `t.plan`) and `mock.timers` (`enable({ apis, now })`, `tick`, `runAll`, `setTime`, `reset`; `setTimeout` / `setInterval` / `setImmediate` / `Date`) | ✅ | [lib-node-test-mock-timers.ts](conformance/lib-node-test-mock-timers.ts) | Mocked timers do not keep the process alive; `t.mock` timers reset after each test |
821
- | `mock.method` / `mock.getter` / `mock.setter` | ❌ | — | Go methods cannot be replaced at runtime |
822
- | Snapshots, coverage, `--test` / `--test-reporter` / `--test-only` flags, `run()` | ❌ | — | Not implemented (`only` runs everything, like Node without `--test-only`) |
927
+ | API | Status | Probe | Notes |
928
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
929
+ | `test` / `it` / `describe` / `suite` (+ `.skip` / `.todo` / `.only`; `skip` / `todo` / `timeout` options); sync, async and `done`-callback tests | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Tests run one after another once the main module has finished, as in Node |
930
+ | `before` / `after` / `beforeEach` / `afterEach` (file and suite level, `t.before` & co.) | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | Node's order: outer `beforeEach` first, inner `afterEach` first |
931
+ | `TestContext`: `t.test` subtests, `t.skip`, `t.todo`, `t.diagnostic`, `t.plan`, `t.name`, `t.fullName`, `t.signal`, `t.mock` | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | |
932
+ | Reporting: TAP (Node's default when stdout is not a terminal) / spec (on a terminal); `tests` / `suites` / `pass` / `fail` / `cancelled` / `skipped` / `todo` counters; exit code 1 on failure | ✅ | [lib-node-test-fail.ts](conformance/lib-node-test-fail.ts) | Same layout as Node, without `location` / `stack` yet (the `//line` directives make them recoverable through `runtime.Callers`); timeouts count as cancelled |
933
+ | `mock.fn(original?, implementation?)`; `fn.mock.calls` / `callCount()` / `mockImplementation(Once)` / `resetCalls()` / `restore()` | ✅ | [lib-node-test.ts](conformance/lib-node-test.ts) | The mock has the original's Go function type |
934
+ | `t.assert` (`node:assert`'s functions, counted by `t.plan`) and `mock.timers` (`enable({ apis, now })`, `tick`, `runAll`, `setTime`, `reset`; `setTimeout` / `setInterval` / `setImmediate` / `Date`) | ✅ | [lib-node-test-mock-timers.ts](conformance/lib-node-test-mock-timers.ts) | Mocked timers do not keep the process alive; `t.mock` timers reset after each test |
935
+ | `mock.method` / `mock.getter` / `mock.setter` | ❌ | — | Object-literal methods are function fields and can be swapped; class methods need calls routed through a replaceable table |
936
+ | `NODE_OPTIONS` flags: `--test-name-pattern` / `--test-skip-pattern` (repeatable, `/re/flags`), `--test-only`, `--test-reporter=tap\|spec\|dot\|junit`; Node's notice for `.only` without `--test-only` | ✅ | [lib-node-test-flags.ts](conformance/lib-node-test-flags.ts) | Read from `NODE_OPTIONS`, as Node reads them (arguments after a program never reach Node's runner either). Filtered-out tests are not reported; a matching suite runs all its tests. The TAP / spec / dot outputs match Node's; junit's failure bodies have no stack traces |
937
+ | Snapshots, `run()`, `--test-reporter-destination` | ❌ | — | Snapshots need `--test-update-snapshots` files next to the program; `run()` needs extra entry points |
938
+ | Coverage | ❌ | — | Would need Go's `-cover` instrumentation mapped back through the `//line` directives |
823
939
 
824
940
  #### `node:worker_threads`
825
941
 
826
- | API | Status | Probe | Notes |
827
- | ---------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
828
- | `Worker` (`workerData`, `argv`, `env` / `SHARE_ENV`; `postMessage`, `'online'` / `'message'` / `'error'` / `'exit'`, `terminate()`, `threadId`, `ref` / `unref`); `isMainThread`, `parentPort`, `workerData`, `threadId` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | A worker re-runs the current program as a child process (an isolate of its own, as in Node) linked over loopback TCP; branch on `isMainThread` |
829
- | Messages: structured clone of JSON-like values, Buffers (arriving as `Uint8Array`s), `Map`, `Set`, `Date`, `bigint`, errors | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | Functions throw `DataCloneError` |
830
- | Uncaught exceptions in a worker / `terminate()` | ✅ | [lib-node-worker-errors.ts](conformance/lib-node-worker-errors.ts) | `'error'` with the message, then exit code `1` |
831
- | `MessageChannel` / `MessagePort` (`postMessage`, `on('message')`, `onmessage`, `start`, `close`, `ref` / `unref`), `receiveMessageOnPort`, `BroadcastChannel`, `get/setEnvironmentData` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | Channels and broadcast channels work within one process (ports can't be transferred to workers) |
832
- | Workers for another file / `eval: true`, transferring ports, `SharedArrayBuffer` / `Atomics`, `resourceLimits`, worker `stdout: true` streams | ❌ | — | One binary holds one program; memory is not shared between processes |
942
+ | API | Status | Probe | Notes |
943
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
944
+ | `Worker` (`workerData`, `argv`, `env` / `SHARE_ENV`; `postMessage`, `'online'` / `'message'` / `'error'` / `'exit'`, `terminate()`, `threadId`, `ref` / `unref`); `isMainThread`, `parentPort`, `workerData`, `threadId` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | A worker re-runs the current program as a child process (an isolate of its own, as in Node) linked over loopback TCP; branch on `isMainThread` |
945
+ | Messages: structured clone of JSON-like values, Buffers (arriving as `Uint8Array`s), `Map`, `Set`, `Date`, `bigint`, errors | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | Objects and records keep their key order, and convert to the listener's declared types; functions throw `DataCloneError` |
946
+ | Uncaught exceptions in a worker / `terminate()` | ✅ | [lib-node-worker-errors.ts](conformance/lib-node-worker-errors.ts) | `'error'` with the message, then exit code `1` |
947
+ | `MessageChannel` / `MessagePort` (`postMessage`, `on('message')`, `onmessage`, `start`, `close`, `ref` / `unref`), `receiveMessageOnPort`, `BroadcastChannel`, `get/setEnvironmentData` | ✅ | [lib-node-worker-threads.ts](conformance/lib-node-worker-threads.ts) | Channels and broadcast channels work within one process (ports can't be transferred to workers) |
948
+ | `new Worker('./worker.ts')` (another file) | ✅ | [lib-node-worker-entry.ts](conformance/lib-node-worker-entry.ts) | The file (a literal path, `new URL('./f.ts', import.meta.url)` or `path.join(__dirname, 'f.ts')`, resolved from the source file at compile time) is compiled into the binary as a second entry point; the child runs it instead of the program, picked by `TN_ENTRY`. Its top-level names share one Go package with the program, so they must not clash; files the program imports still run their top-level code in every process |
949
+ | Transferring ports, `resourceLimits`, worker `stdout: true` streams | ❌ | — | Ports can be relayed through the parent; `resourceLimits` maps to `debug.SetMemoryLimit` |
950
+ | `eval: true`, `SharedArrayBuffer` / `Atomics` | 🚫 | — | `eval` needs a JavaScript engine; workers are processes, so memory is not shared |
833
951
 
834
952
  #### `node:sqlite`
835
953
 
@@ -839,289 +957,324 @@ ships the driver in [govendor/](govendor/) (`npm run vendor:go` updates it), so
839
957
  network; it adds about 10 MB to a binary. Rows are records: `row.name`, `row as Row` and
840
958
  `rows as Row[]` all work.
841
959
 
842
- | API | Status | Probe | Notes |
843
- | --- | :----: | ----- | ----- |
844
- | `new DatabaseSync(path, options)` (`:memory:`, files, `file:` URIs), `open` / `close` / `isOpen` / `isTransaction` / `location()`, `exec` | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | `open: false` defers to `open()` |
845
- | `prepare(sql, options)`; `StatementSync#run` (`{ changes, lastInsertRowid }`) / `get` / `all` / `iterate` (`for…of`, `next()`) | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | Rows are objects keyed by column name; `get()` without a row is `undefined` |
846
- | Parameters: anonymous `?`, named `:x` / `$x` / `@x`, bare names (`{ x }`); values `null`, number (REAL), bigint (INTEGER), string, boolean (1 / 0), `Uint8Array` / Buffer | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | Results: INTEGER → number (bigint with `readBigInts`), REAL → number, TEXT → string, BLOB → `Uint8Array`, NULL → `null` |
847
- | Options `readOnly`, `enableForeignKeyConstraints` (on by default), `enableDoubleQuotedStringLiterals`, `timeout`, `readBigInts`, `returnArrays`, `allowBareNamedParameters`, `allowUnknownNamedParameters`, `defensive`, `limits` | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | `db.limits.x = n` sets a limit; `Infinity` restores the maximum |
848
- | `columns()`, `sourceSQL`, `expandedSQL`, `setReadBigInts` / `setReturnArrays` / `setAllowBareNamedParameters` / `setAllowUnknownNamedParameters`, `enableDefensive` | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | |
849
- | `createTagStore()` (`` sql.get`… ${x}` `` / `all` / `run` / `iterate`, `size`, `capacity`, `clear`) | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | One cached statement per template, least recently used out first |
850
- | `function(name, options, fn)` (`deterministic`, `directOnly`, `varargs`, `useBigIntArguments`), `aggregate(name, { start, step, result, inverse })` (window functions) | ✅ | [lib-node-sqlite-functions.ts](conformance/lib-node-sqlite-functions.ts) | A throw inside the callback is rethrown by the statement |
851
- | `setAuthorizer(callback)`, `constants` (`SQLITE_OK` / `DENY` / `IGNORE`, action codes, `SQLITE_CHANGESET_*`) | ✅ | [lib-node-sqlite-functions.ts](conformance/lib-node-sqlite-functions.ts) | |
852
- | Errors: SQLite's message with `code: 'ERR_SQLITE_ERROR'`, `errcode` (extended result code), `errstr`; `ERR_INVALID_STATE` / `ERR_OUT_OF_RANGE` / `ERR_INVALID_ARG_VALUE` | ✅ | [lib-node-sqlite-errors.ts](conformance/lib-node-sqlite-errors.ts) | Same messages as Node 24 |
853
- | `backup(db, path, { source, rate, progress })` | ✅ | [lib-node-sqlite-errors.ts](conformance/lib-node-sqlite-errors.ts) | Copies `rate` pages per event-loop turn; resolves with the page count |
854
- | `loadExtension` / `enableLoadExtension` | ❌ | — | SQLite runs as Wasm inside the program; native extensions can't load |
855
- | `createSession` / `applyChangeset` | ❌ | — | The bundled SQLite build has no session extension |
856
- | `serialize` / `deserialize` | ❌ | — | The driver has no `sqlite3_serialize` binding |
857
- | `undefined` as a parameter value, `[Object: null prototype]` rows | ❌ | — | `undefined` and `null` are both `nil` (binds NULL instead of throwing); rows print as plain objects |
858
- | Finalizing a statement when it is garbage-collected | ❌ | — | Statements live until `db.close()` (Go has no hook that is safe here): re-preparing in a loop holds every copy until then; reuse statements or `createTagStore()` |
960
+ | API | Status | Probe | Notes |
961
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
962
+ | `new DatabaseSync(path, options)` (`:memory:`, files, `file:` URIs), `open` / `close` / `isOpen` / `isTransaction` / `location()`, `exec` | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | `open: false` defers to `open()` |
963
+ | `prepare(sql, options)`; `StatementSync#run` (`{ changes, lastInsertRowid }`) / `get` / `all` / `iterate` (`for…of`, `next()`) | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | Rows are objects keyed by column name; `get()` without a row is `undefined` |
964
+ | Parameters: anonymous `?`, named `:x` / `$x` / `@x`, bare names (`{ x }`); values `null`, number (REAL), bigint (INTEGER), string, boolean (1 / 0), `Uint8Array` / Buffer | ✅ | [lib-node-sqlite.ts](conformance/lib-node-sqlite.ts) | Results: INTEGER → number (bigint with `readBigInts`), REAL → number, TEXT → string, BLOB → `Uint8Array`, NULL → `null` |
965
+ | Options `readOnly`, `enableForeignKeyConstraints` (on by default), `enableDoubleQuotedStringLiterals`, `timeout`, `readBigInts`, `returnArrays`, `allowBareNamedParameters`, `allowUnknownNamedParameters`, `defensive`, `limits` | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | `db.limits.x = n` sets a limit; `Infinity` restores the maximum |
966
+ | `columns()`, `sourceSQL`, `expandedSQL`, `setReadBigInts` / `setReturnArrays` / `setAllowBareNamedParameters` / `setAllowUnknownNamedParameters`, `enableDefensive` | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | |
967
+ | `createTagStore()` (`` sql.get`… ${x}` `` / `all` / `run` / `iterate`, `size`, `capacity`, `clear`) | ✅ | [lib-node-sqlite-options.ts](conformance/lib-node-sqlite-options.ts) | One cached statement per template, least recently used out first |
968
+ | `function(name, options, fn)` (`deterministic`, `directOnly`, `varargs`, `useBigIntArguments`), `aggregate(name, { start, step, result, inverse })` (window functions) | ✅ | [lib-node-sqlite-functions.ts](conformance/lib-node-sqlite-functions.ts) | A throw inside the callback is rethrown by the statement |
969
+ | `setAuthorizer(callback)`, `constants` (`SQLITE_OK` / `DENY` / `IGNORE`, action codes, `SQLITE_CHANGESET_*`) | ✅ | [lib-node-sqlite-functions.ts](conformance/lib-node-sqlite-functions.ts) | |
970
+ | Errors: SQLite's message with `code: 'ERR_SQLITE_ERROR'`, `errcode` (extended result code), `errstr`; `ERR_INVALID_STATE` / `ERR_OUT_OF_RANGE` / `ERR_INVALID_ARG_VALUE` | ✅ | [lib-node-sqlite-errors.ts](conformance/lib-node-sqlite-errors.ts) | Same messages as Node 24 |
971
+ | `backup(db, path, { source, rate, progress })` | ✅ | [lib-node-sqlite-errors.ts](conformance/lib-node-sqlite-errors.ts) | Copies `rate` pages per event-loop turn; resolves with the page count |
972
+ | `loadExtension` / `enableLoadExtension` | 🚫 | — | SQLite runs as Wasm inside the program; native extensions can't load |
973
+ | `createSession` / `applyChangeset` | ❌ | — | The bundled SQLite build has no session extension: needs an emulation over the preupdate hook (hard) |
974
+ | `serialize(dbName?)` / `deserialize(buffer, { dbName })` | ✅ | [lib-node-sqlite-serialize.ts](conformance/lib-node-sqlite-serialize.ts) | Newer Node API (not in Node 22). The driver has no `sqlite3_serialize` binding, so the image goes through a temporary file and SQLite's backup API |
975
+ | `undefined` as a parameter value, `[Object: null prototype]` rows | 🚫 | — | `undefined` and `null` are both `nil` (binds NULL instead of throwing); rows print as plain objects |
976
+ | Finalizing a statement when it is garbage-collected | ✅ | [lib-node-sqlite-finalize.ts](conformance/lib-node-sqlite-finalize.ts) | `runtime.AddCleanup` posts the finalize to the event loop once nothing references the statement; `db.close()` finalizes the rest |
859
977
 
860
978
  #### `node:inspector`
861
979
 
862
- | API | Status | Probe | Notes |
863
- | --- | :----: | ----- | ----- |
864
- | Debugger / profiler sessions (`Session`, `open`, `url`) | ❌ | — | Speaks the inspector protocol of a JavaScript engine; a native binary has none |
980
+ | API | Status | Probe | Notes |
981
+ | ------------------------------------------------------- | :----: | ----- | ------------------------------------------------------------------------------ |
982
+ | Debugger / profiler sessions (`Session`, `open`, `url`) | 🚫 | — | Speaks the inspector protocol of a JavaScript engine; a native binary has none |
865
983
 
866
984
  #### `node:repl`
867
985
 
868
- | API | Status | Probe | Notes |
869
- | --- | :----: | ----- | ----- |
870
- | `start` / `REPLServer` | ❌ | — | Evaluates JavaScript at runtime; needs a JavaScript engine |
986
+ | API | Status | Probe | Notes |
987
+ | ---------------------- | :----: | ----- | ---------------------------------------------------------- |
988
+ | `start` / `REPLServer` | 🚫 | — | Evaluates JavaScript at runtime; needs a JavaScript engine |
871
989
 
872
990
  #### `node:vm`
873
991
 
874
- | API | Status | Probe | Notes |
875
- | --- | :----: | ----- | ----- |
876
- | `Script` / `runInContext` / `createContext` / `compileFunction` & co. | ❌ | — | Compiles and runs JavaScript code at runtime; needs a JavaScript engine |
992
+ | API | Status | Probe | Notes |
993
+ | --------------------------------------------------------------------- | :----: | ----- | ----------------------------------------------------------------------- |
994
+ | `Script` / `runInContext` / `createContext` / `compileFunction` & co. | 🚫 | — | Compiles and runs JavaScript code at runtime; needs a JavaScript engine |
877
995
 
878
996
  #### `node:v8`
879
997
 
880
- | API | Status | Probe | Notes |
881
- | --- | :----: | ----- | ----- |
882
- | Heap statistics / snapshots, `serialize` / `deserialize`, flags | ❌ | — | V8 internals; there is no V8 in a native binary |
998
+ | API | Status | Probe | Notes |
999
+ | ------------------------------------------------------- | :----: | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1000
+ | `getHeapStatistics`, `serialize` / `deserialize` | ✅ | [lib-node-module-v8.ts](conformance/lib-node-module-v8.ts) | Heap numbers from `runtime.MemStats` (the limit is `GOMEMLIMIT`, else 4 GiB); `serialize` uses the structured-clone codec workers use, not V8's wire format; objects keep their key order |
1001
+ | `getHeapSpaceStatistics`, `getHeapCodeStatistics` | ❌ | — | Feasible as approximations; Go's heap has no V8 spaces |
1002
+ | Heap snapshots, `setFlagsFromString`, `startupSnapshot` | 🚫 | — | V8 internals; there is no V8 in a native binary |
883
1003
 
884
1004
  #### `node:wasi`
885
1005
 
886
- | API | Status | Probe | Notes |
887
- | --- | :----: | ----- | ----- |
888
- | `WASI` | ❌ | — | Runs WebAssembly modules; the generated program has no Wasm runtime |
1006
+ | API | Status | Probe | Notes |
1007
+ | ------ | :----: | ----- | -------------------------------------------------------------------------- |
1008
+ | `WASI` | ❌ | — | Needs a Wasm runtime: vendoring wazero (pure Go, no cgo) would provide one |
889
1009
 
890
1010
  #### `node:sea`
891
1011
 
892
- | API | Status | Probe | Notes |
893
- | --- | :----: | ----- | ----- |
894
- | `isSea` / `getAsset` / `getRawAsset` | ❌ | — | Single-executable-application assets; TypeNative already produces a native binary |
1012
+ | API | Status | Probe | Notes |
1013
+ | -------------------------------------- | :----: | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1014
+ | `isSea` | ✅ | [lib-node-module-v8.ts](conformance/lib-node-module-v8.ts) | Always `true`: every TypeNative binary is a single executable |
1015
+ | `getAsset` / `getRawAsset` with assets | ❌ | — | No SEA config is read, so no asset is added and these throw `ERR_SINGLE_EXECUTABLE_APPLICATION_ASSET_NOT_FOUND`; embed files with `go:embed` instead ([lib-go-embed.ts](conformance/lib-go-embed.ts)) |
895
1016
 
896
1017
  #### `node:trace_events`
897
1018
 
898
- | API | Status | Probe | Notes |
899
- | --- | :----: | ----- | ----- |
900
- | `createTracing` / `getEnabledCategories` | ❌ | — | V8 / Node trace categories; no native equivalent |
1019
+ | API | Status | Probe | Notes |
1020
+ | ---------------------------------------- | :----: | ----- | ------------------------------------------------ |
1021
+ | `createTracing` / `getEnabledCategories` | 🚫 | — | V8 / Node trace categories; no native equivalent |
901
1022
 
902
1023
  #### `node:module`
903
1024
 
904
- | API | Status | Probe | Notes |
905
- | --- | :----: | ----- | ----- |
906
- | `createRequire` / `register` / `builtinModules` / `findPackageJSON` & co. | ❌ | — | Loader hooks for a JavaScript runtime; imports are resolved at compile time |
1025
+ | API | Status | Probe | Notes |
1026
+ | ----------------------------------------------------------------------------- | :----: | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
1027
+ | `builtinModules` / `isBuiltin` | ✅ | [lib-node-module-v8.ts](conformance/lib-node-module-v8.ts) | Node 22's list; `node:test`, `node:sqlite` and `node:sea` need the scheme, as in Node |
1028
+ | `createRequire(import.meta.url)` and `require('./data.json')` | ✅ | [lib-json-modules.ts](conformance/lib-json-modules.ts) | JSON files only, read at compile time; `require` of a module reports an error (use `import`) |
1029
+ | `findPackageJSON`, `require` of modules | ❌ | — | Feasible: a literal module specifier resolved at compile time like an import |
1030
+ | `register` / `registerHooks` (loader hooks), `require` of computed specifiers | 🚫 | — | Hooks into a JavaScript loader; imports are resolved at compile time |
907
1031
 
908
1032
  #### `node:test/reporters`
909
1033
 
910
- | API | Status | Probe | Notes |
911
- | --- | :----: | ----- | ----- |
912
- | `tap` / `spec` / `dot` / `junit` / `lcov` | ❌ | — | Reporters consume `run()`'s event stream, and `run()` runs test files as separate processes; one binary holds one program (see [test](#nodetest)) |
1034
+ | API | Status | Probe | Notes |
1035
+ | ------------------------------------------- | :----: | ----- | -------------------------------------------------------------------------------------------------------------------------------- |
1036
+ | `tap` / `spec` / `dot` / `junit` as exports | ❌ | — | The four reporters exist (`--test-reporter` in [test](#nodetest)); exporting them as stream transforms only matters with `run()` |
1037
+ | `lcov` | ❌ | — | Needs coverage (see [test](#nodetest)) |
913
1038
 
914
1039
  #### `node:domain`
915
1040
 
916
- | API | Status | Probe | Notes |
917
- | --- | :----: | ----- | ----- |
918
- | `create` / `Domain` | ❌ | — | Deprecated upstream |
1041
+ | API | Status | Probe | Notes |
1042
+ | ------------------- | :----: | ----- | ------------------- |
1043
+ | `create` / `Domain` | 🚫 | — | Deprecated upstream |
919
1044
 
920
1045
  ### Go bridges (`go:*`)
921
1046
 
922
- Status: ✅ probed, ⚠️ typed (declared and bridged), no probe yet, ❌ excluded.
1047
+ Status: ✅ probed, 🚫 can't work in a TypeNative program (see [Known limitations](#known-limitations-)).
923
1048
 
924
1049
  <!-- go-bridges:start -->
925
- | Module | Status | Probe | Notes |
926
- | ------ | :----: | ----- | ----- |
927
- | `go:archive/tar` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | tar archive read/write |
928
- | `go:archive/zip` | ✅ | [lib-go-archive.ts](conformance/lib-go-archive.ts) | ZIP archive read/write |
929
- | `go:bufio` | ✅ | [lib-go-bufio.ts](conformance/lib-go-bufio.ts) | Buffered I/O |
930
- | `go:bytes` | ✅ | [lib-go-bytes.ts](conformance/lib-go-bytes.ts) | Byte-slice utilities |
931
- | `go:cmp` | ✅ | [lib-go-slices.ts](conformance/lib-go-slices.ts) | Ordered comparison primitives |
932
- | `go:compress/bzip2` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | bzip2 decompression (read-only) |
933
- | `go:compress/flate` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | DEFLATE compression |
934
- | `go:compress/gzip` | ✅ | [lib-go-compress-gzip.ts](conformance/lib-go-compress-gzip.ts) | gzip read/write |
935
- | `go:compress/lzw` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | LZW compression (GIF/PDF/TIFF) |
936
- | `go:compress/zlib` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | zlib read/write |
937
- | `go:container/heap` | ⚠️ | — | Needs a TS class satisfying `heap.Interface`; TS classes cannot implement Go interfaces yet |
938
- | `go:container/list` | ✅ | [lib-go-containers.ts](conformance/lib-go-containers.ts) | Doubly linked list |
939
- | `go:container/ring` | ✅ | [lib-go-containers.ts](conformance/lib-go-containers.ts) | Circular list |
940
- | `go:context` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Cancellation and deadlines |
941
- | `go:crypto` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | Crypto constants and algorithm selection |
942
- | `go:crypto/aes` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | AES encryption |
943
- | `go:crypto/cipher` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Block cipher modes (GCM, CBC, CTR) |
944
- | `go:crypto/des` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | DES / triple DES (deprecated) |
945
- | `go:crypto/dsa` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | DSA signatures (deprecated) |
946
- | `go:crypto/ecdh` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ECDH key exchange |
947
- | `go:crypto/ecdsa` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ECDSA signatures |
948
- | `go:crypto/ed25519` | ✅ | [lib-go-ed25519.ts](conformance/lib-go-ed25519.ts) | Ed25519 signatures |
949
- | `go:crypto/elliptic` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | Elliptic curves (legacy; use ecdh/ecdsa) |
950
- | `go:crypto/fips140` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | FIPS 140-3 mode controls |
951
- | `go:crypto/hkdf` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | HKDF key derivation |
952
- | `go:crypto/hmac` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | HMAC keyed hashing |
953
- | `go:crypto/hpke` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | HPKE encryption (RFC 9180) |
954
- | `go:crypto/md5` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | MD5 hash |
955
- | `go:crypto/mlkem` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ML-KEM post-quantum key encapsulation |
956
- | `go:crypto/mlkem/mlkemtest` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | Deterministic ML-KEM encapsulation |
957
- | `go:crypto/pbkdf2` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | PBKDF2 key derivation |
958
- | `go:crypto/rand` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Cryptographically secure random bytes |
959
- | `go:crypto/rc4` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | RC4 stream cipher (deprecated) |
960
- | `go:crypto/rsa` | ✅ | [lib-go-rsa.ts](conformance/lib-go-rsa.ts) | RSA signatures / encryption |
961
- | `go:crypto/sha1` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | SHA-1 hash |
962
- | `go:crypto/sha256` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | SHA-224 / SHA-256 hashes |
963
- | `go:crypto/sha3` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | SHA-3 / SHAKE hashes |
964
- | `go:crypto/sha512` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | SHA-384 / SHA-512 family hashes |
965
- | `go:crypto/subtle` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Constant-time comparison primitives |
966
- | `go:crypto/tls` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | TLS client/server; loopback probe is a later phase |
967
- | `go:crypto/x509` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | X.509 certificates and revocation |
968
- | `go:crypto/x509/pkix` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | X.509 ASN.1/PKIX structures |
969
- | `go:database/sql` | ✅ | [lib-go-sql.ts](conformance/lib-go-sql.ts) | No std driver: registry and errors probed |
970
- | `go:database/sql/driver` | ✅ | [lib-go-sql.ts](conformance/lib-go-sql.ts) | Driver interfaces and value converters |
971
- | `go:debug/buildinfo` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Build info from executables |
972
- | `go:debug/dwarf` | ⚠️ | — | DWARF debug info parsing |
973
- | `go:debug/elf` | ⚠️ | — | ELF object files |
974
- | `go:debug/gosym` | ⚠️ | — | Go symbol tables |
975
- | `go:debug/macho` | ⚠️ | — | Mach-O object files |
976
- | `go:debug/pe` | ⚠️ | — | PE (Windows) object files |
977
- | `go:debug/plan9obj` | ⚠️ | — | Plan 9 object files |
978
- | `go:encoding` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | Shared encoding interfaces |
979
- | `go:encoding/ascii85` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | ascii85 encoding |
980
- | `go:encoding/asn1` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | ASN.1 DER encoding |
981
- | `go:encoding/base32` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | base32 encoding |
982
- | `go:encoding/base64` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | base64 encoding |
983
- | `go:encoding/binary` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | Binary packing / varints |
984
- | `go:encoding/csv` | ✅ | [lib-go-csv.ts](conformance/lib-go-csv.ts) | CSV read/write |
985
- | `go:encoding/gob` | ✅ | [lib-go-gob.ts](conformance/lib-go-gob.ts) | Go binary serialization |
986
- | `go:encoding/hex` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | hex encoding |
987
- | `go:encoding/json` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | JSON encode/decode |
988
- | `go:encoding/pem` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | PEM encoding |
989
- | `go:encoding/xml` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | XML read/write |
990
- | `go:errors` | ✅ | [lib-go-errors.ts](conformance/lib-go-errors.ts) | Error creation / wrapping / inspection |
991
- | `go:expvar` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Public process variables |
992
- | `go:flag` | ✅ | [lib-go-exec.ts](conformance/lib-go-exec.ts) | Command-line flag parsing |
993
- | `go:fmt` | ✅ | [lib-go-fmt.ts](conformance/lib-go-fmt.ts) | Formatted I/O; integer verbs take TS numbers |
994
- | `go:go/ast` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go syntax tree |
995
- | `go:go/build` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go package build metadata |
996
- | `go:go/build/constraint` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Build-tag constraint parsing |
997
- | `go:go/constant` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Untyped constant values |
998
- | `go:go/doc` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go doc extraction |
999
- | `go:go/doc/comment` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Doc comment parse/print |
1000
- | `go:go/format` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go source formatting |
1001
- | `go:go/importer` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Export-data type importer |
1002
- | `go:go/parser` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go source parser |
1003
- | `go:go/printer` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go AST printer |
1004
- | `go:go/scanner` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go tokenizer |
1005
- | `go:go/token` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go tokens / positions |
1006
- | `go:go/types` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go type checker |
1007
- | `go:go/version` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go version comparison |
1008
- | `go:hash` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | Hash function interface |
1009
- | `go:hash/adler32` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | Adler-32 checksum |
1010
- | `go:hash/crc32` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | CRC-32 checksum |
1011
- | `go:hash/crc64` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | CRC-64 checksum |
1012
- | `go:hash/fnv` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | FNV-1 / FNV-1a hash |
1013
- | `go:hash/maphash` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | Seeded string hashing |
1014
- | `go:html` | ✅ | [lib-go-url.ts](conformance/lib-go-url.ts) | HTML escaping |
1015
- | `go:html/template` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | HTML templating (auto-escaped) |
1016
- | `go:image` | ✅ | [lib-go-image.ts](conformance/lib-go-image.ts) | 2D image interface |
1017
- | `go:image/color` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Color types |
1018
- | `go:image/color/palette` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Standard color palettes |
1019
- | `go:image/draw` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Image compositing |
1020
- | `go:image/gif` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | GIF decode/encode |
1021
- | `go:image/jpeg` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | JPEG decode/encode |
1022
- | `go:image/png` | ✅ | [lib-go-image.ts](conformance/lib-go-image.ts) | PNG decode/encode |
1023
- | `go:index/suffixarray` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Suffix-array substring search |
1024
- | `go:io` | ✅ | [lib-go-compress-gzip.ts](conformance/lib-go-compress-gzip.ts) | Core I/O interfaces (Reader/Writer) |
1025
- | `go:io/fs` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Filesystem abstraction |
1026
- | `go:io/ioutil` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Deprecated I/O helpers (Go 1.16) |
1027
- | `go:iter` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Range-over-func iterators via `for…of`; `Pull` not bridged |
1028
- | `go:log` | ✅ | [lib-go-log.ts](conformance/lib-go-log.ts) | Logging to stderr |
1029
- | `go:log/slog` | ✅ | [lib-go-log.ts](conformance/lib-go-log.ts) | Structured logging |
1030
- | `go:log/syslog` | ⚠️ | — | Unix syslog; no portable probe |
1031
- | `go:maps` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Generic map helpers |
1032
- | `go:math` | ✅ | [lib-go-math.ts](conformance/lib-go-math.ts) | Math functions |
1033
- | `go:math/big` | ✅ | [lib-go-big.ts](conformance/lib-go-big.ts) | Arbitrary-precision arithmetic |
1034
- | `go:math/bits` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Bit operations |
1035
- | `go:math/cmplx` | ⚠️ | — | `complex128` has no TS mapping |
1036
- | `go:math/rand` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Pseudo-random numbers |
1037
- | `go:math/rand/v2` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Pseudo-random numbers (v2 API) |
1038
- | `go:mime` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | MIME media types |
1039
- | `go:mime/multipart` | ✅ | [lib-go-misc.ts](conformance/lib-go-misc.ts) | Multipart forms |
1040
- | `go:mime/quotedprintable` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | Quoted-printable encoding |
1041
- | `go:net` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Sockets (loopback TCP), addresses |
1042
- | `go:net/http` | ✅ | [lib-go-http.ts](conformance/lib-go-http.ts) | HTTP client/server (loopback) |
1043
- | `go:net/http/cgi` | ✅ | [lib-go-http-extra.ts](conformance/lib-go-http-extra.ts) | CGI request parsing |
1044
- | `go:net/http/cookiejar` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Cookie jars (loopback) |
1045
- | `go:net/http/fcgi` | ⚠️ | — | FastCGI handler; needs a FastCGI web server |
1046
- | `go:net/http/httptest` | ✅ | [lib-go-http.ts](conformance/lib-go-http.ts) | HTTP test servers (loopback) |
1047
- | `go:net/http/httptrace` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | HTTP tracing hooks |
1048
- | `go:net/http/httputil` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | HTTP utilities (loopback) |
1049
- | `go:net/http/pprof` | ✅ | [lib-go-http-extra.ts](conformance/lib-go-http-extra.ts) | pprof HTTP handlers |
1050
- | `go:net/mail` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | Mail address parsing |
1051
- | `go:net/netip` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | IP address types |
1052
- | `go:net/rpc` | ⚠️ | — | Needs Go method sets on registered receivers |
1053
- | `go:net/rpc/jsonrpc` | ⚠️ | — | Needs Go method sets on registered receivers |
1054
- | `go:net/smtp` | ⚠️ | — | SMTP client; needs a server |
1055
- | `go:net/textproto` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Text protocol I/O |
1056
- | `go:net/url` | ✅ | [lib-go-url.ts](conformance/lib-go-url.ts) | URL parsing |
1057
- | `go:os` | ✅ | [lib-go-os.ts](conformance/lib-go-os.ts) | OS files and processes |
1058
- | `go:os/exec` | ✅ | [lib-go-exec.ts](conformance/lib-go-exec.ts) | External commands |
1059
- | `go:os/signal` | ✅ | [lib-go-misc.ts](conformance/lib-go-misc.ts) | Signal notification (`Notify` + `Stop`) |
1060
- | `go:os/user` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | User lookup |
1061
- | `go:path` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Slash-separated paths |
1062
- | `go:path/filepath` | ✅ | [lib-go-os.ts](conformance/lib-go-os.ts) | File paths |
1063
- | `go:reflect` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Runtime reflection |
1064
- | `go:regexp` | ✅ | [lib-go-regexp.ts](conformance/lib-go-regexp.ts) | Regular expressions |
1065
- | `go:regexp/syntax` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Regexp parse trees |
1066
- | `go:runtime` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Runtime introspection |
1067
- | `go:runtime/debug` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Stack traces and GC stats |
1068
- | `go:runtime/metrics` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Runtime metrics sampling |
1069
- | `go:runtime/pprof` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Profiling data |
1070
- | `go:runtime/trace` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Execution tracing |
1071
- | `go:slices` | ✅ | [lib-go-slices.ts](conformance/lib-go-slices.ts) | Generic slice helpers |
1072
- | `go:sort` | ✅ | [lib-go-sort.ts](conformance/lib-go-sort.ts) | Sorting |
1073
- | `go:strconv` | ✅ | [lib-go-strconv.ts](conformance/lib-go-strconv.ts) | String conversions |
1074
- | `go:strings` | ✅ | [lib-go-strings.ts](conformance/lib-go-strings.ts) | String utilities |
1075
- | `go:structs` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | `HostLayout` marker |
1076
- | `go:sync` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Mutexes and wait groups |
1077
- | `go:sync/atomic` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Atomic operations |
1078
- | `go:syscall` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | Portable subset probed; per-arch constants dropped |
1079
- | `go:testing` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Helpers usable outside `go test` |
1080
- | `go:testing/cryptotest` | ⚠️ | — | Needs a `*testing.T` (no `go test` harness) |
1081
- | `go:testing/fstest` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | `TestFS` over any `fs.FS` |
1082
- | `go:testing/iotest` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Reader/writer test wrappers |
1083
- | `go:testing/quick` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Property checks with TS callbacks |
1084
- | `go:testing/slogtest` | ⚠️ | — | Needs a `*testing.T` (no `go test` harness) |
1085
- | `go:testing/synctest` | ⚠️ | — | Needs a `*testing.T` (no `go test` harness) |
1086
- | `go:text/scanner` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Text scanner |
1087
- | `go:text/tabwriter` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Aligned text columns |
1088
- | `go:text/template` | ✅ | [lib-go-template.ts](conformance/lib-go-template.ts) | Text templating |
1089
- | `go:text/template/parse` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Template parse trees |
1090
- | `go:time` | ✅ | [lib-go-time.ts](conformance/lib-go-time.ts) | Time and durations |
1091
- | `go:time/tzdata` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Embedded timezone database (side-effect import) |
1092
- | `go:unicode` | ✅ | [lib-go-unicode.ts](conformance/lib-go-unicode.ts) | Unicode tables |
1093
- | `go:unicode/utf16` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | UTF-16 encoding |
1094
- | `go:unicode/utf8` | ✅ | [lib-go-unicode.ts](conformance/lib-go-unicode.ts) | UTF-8 encoding |
1095
- | `go:unique` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Canonical values |
1096
- | `go:weak` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | Weak pointers |
1097
- | `go:plugin` | ❌ | — | cgo, `-buildmode=plugin` |
1098
- | `go:unsafe` | ❌ | — | raw pointers |
1099
- | `go:runtime/race` | ❌ | — | needs `-race` |
1100
- | `go:runtime/coverage` | ❌ | — | needs `-cover` |
1101
- | `go:runtime/cgo` | ❌ | — | needs cgo |
1102
- | `go:embed` | ❌ | — | needs a `//go:embed` directive; a later phase |
1050
+
1051
+ | Module | Status | Probe | Notes |
1052
+ | --------------------------- | :----: | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
1053
+ | `go:archive/tar` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | tar archive read/write |
1054
+ | `go:archive/zip` | ✅ | [lib-go-archive.ts](conformance/lib-go-archive.ts) | ZIP archive read/write |
1055
+ | `go:bufio` | ✅ | [lib-go-bufio.ts](conformance/lib-go-bufio.ts) | Buffered I/O |
1056
+ | `go:bytes` | ✅ | [lib-go-bytes.ts](conformance/lib-go-bytes.ts) | Byte-slice utilities |
1057
+ | `go:cmp` | ✅ | [lib-go-slices.ts](conformance/lib-go-slices.ts) | Ordered comparison primitives |
1058
+ | `go:compress/bzip2` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | bzip2 decompression (read-only) |
1059
+ | `go:compress/flate` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | DEFLATE compression |
1060
+ | `go:compress/gzip` | ✅ | [lib-go-compress-gzip.ts](conformance/lib-go-compress-gzip.ts) | gzip read/write |
1061
+ | `go:compress/lzw` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | LZW compression (GIF/PDF/TIFF) |
1062
+ | `go:compress/zlib` | ✅ | [lib-go-compress-extra.ts](conformance/lib-go-compress-extra.ts) | zlib read/write |
1063
+ | `go:container/heap` | ✅ | [lib-go-container-heap.ts](conformance/lib-go-container-heap.ts) | A TS class implementing `heap.Interface` (see Go interfaces below) |
1064
+ | `go:container/list` | ✅ | [lib-go-containers.ts](conformance/lib-go-containers.ts) | Doubly linked list |
1065
+ | `go:container/ring` | ✅ | [lib-go-containers.ts](conformance/lib-go-containers.ts) | Circular list |
1066
+ | `go:context` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Cancellation and deadlines |
1067
+ | `go:crypto` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | Crypto constants and algorithm selection |
1068
+ | `go:crypto/aes` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | AES encryption |
1069
+ | `go:crypto/cipher` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Block cipher modes (GCM, CBC, CTR) |
1070
+ | `go:crypto/des` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | DES / triple DES (deprecated) |
1071
+ | `go:crypto/dsa` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | DSA signatures (deprecated) |
1072
+ | `go:crypto/ecdh` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ECDH key exchange |
1073
+ | `go:crypto/ecdsa` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ECDSA signatures |
1074
+ | `go:crypto/ed25519` | ✅ | [lib-go-ed25519.ts](conformance/lib-go-ed25519.ts) | Ed25519 signatures |
1075
+ | `go:crypto/elliptic` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | Elliptic curves (legacy; use ecdh/ecdsa) |
1076
+ | `go:crypto/fips140` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | FIPS 140-3 mode controls |
1077
+ | `go:crypto/hkdf` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | HKDF key derivation |
1078
+ | `go:crypto/hmac` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | HMAC keyed hashing |
1079
+ | `go:crypto/hpke` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | HPKE encryption (RFC 9180) |
1080
+ | `go:crypto/md5` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | MD5 hash |
1081
+ | `go:crypto/mlkem` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | ML-KEM post-quantum key encapsulation |
1082
+ | `go:crypto/mlkem/mlkemtest` | ✅ | [lib-go-crypto-more.ts](conformance/lib-go-crypto-more.ts) | Deterministic ML-KEM encapsulation |
1083
+ | `go:crypto/pbkdf2` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | PBKDF2 key derivation |
1084
+ | `go:crypto/rand` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Cryptographically secure random bytes |
1085
+ | `go:crypto/rc4` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | RC4 stream cipher (deprecated) |
1086
+ | `go:crypto/rsa` | ✅ | [lib-go-rsa.ts](conformance/lib-go-rsa.ts) | RSA signatures / encryption |
1087
+ | `go:crypto/sha1` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | SHA-1 hash |
1088
+ | `go:crypto/sha256` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | SHA-224 / SHA-256 hashes |
1089
+ | `go:crypto/sha3` | ✅ | [lib-go-crypto-extra.ts](conformance/lib-go-crypto-extra.ts) | SHA-3 / SHAKE hashes |
1090
+ | `go:crypto/sha512` | ✅ | [lib-go-crypto-hash.ts](conformance/lib-go-crypto-hash.ts) | SHA-384 / SHA-512 family hashes |
1091
+ | `go:crypto/subtle` | ✅ | [lib-go-crypto-aes.ts](conformance/lib-go-crypto-aes.ts) | Constant-time comparison primitives |
1092
+ | `go:crypto/tls` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | TLS client/server; loopback probe is a later phase |
1093
+ | `go:crypto/x509` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | X.509 certificates and revocation |
1094
+ | `go:crypto/x509/pkix` | ✅ | [lib-go-crypto-keys.ts](conformance/lib-go-crypto-keys.ts) | X.509 ASN.1/PKIX structures |
1095
+ | `go:database/sql` | ✅ | [lib-go-sql.ts](conformance/lib-go-sql.ts) | No std driver: registry and errors probed |
1096
+ | `go:database/sql/driver` | ✅ | [lib-go-sql.ts](conformance/lib-go-sql.ts) | Driver interfaces and value converters |
1097
+ | `go:debug/buildinfo` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Build info from executables |
1098
+ | `go:debug/dwarf` | ✅ | [lib-go-debug.ts](conformance/lib-go-debug.ts) | DWARF debug info parsing |
1099
+ | `go:debug/elf` | ✅ | [lib-go-debug.ts](conformance/lib-go-debug.ts) | ELF object files |
1100
+ | `go:debug/gosym` | ✅ | [lib-go-debug.ts](conformance/lib-go-debug.ts) | Go symbol tables |
1101
+ | `go:debug/macho` | ✅ | [lib-go-debug.ts](conformance/lib-go-debug.ts) | Mach-O object files |
1102
+ | `go:debug/pe` | ✅ | [lib-go-debug.ts](conformance/lib-go-debug.ts) | PE (Windows) object files |
1103
+ | `go:debug/plan9obj` | ✅ | [lib-go-debug.ts](conformance/lib-go-debug.ts) | Plan 9 object files |
1104
+ | `go:embed` | ✅ | [lib-go-embed.ts](conformance/lib-go-embed.ts) | `embed.string` / `bytes` / `files` compile to `//go:embed` vars |
1105
+ | `go:encoding` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | Shared encoding interfaces |
1106
+ | `go:encoding/ascii85` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | ascii85 encoding |
1107
+ | `go:encoding/asn1` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | ASN.1 DER encoding |
1108
+ | `go:encoding/base32` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | base32 encoding |
1109
+ | `go:encoding/base64` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | base64 encoding |
1110
+ | `go:encoding/binary` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | Binary packing / varints |
1111
+ | `go:encoding/csv` | ✅ | [lib-go-csv.ts](conformance/lib-go-csv.ts) | CSV read/write |
1112
+ | `go:encoding/gob` | ✅ | [lib-go-gob.ts](conformance/lib-go-gob.ts) | Go binary serialization |
1113
+ | `go:encoding/hex` | ✅ | [lib-go-encoding.ts](conformance/lib-go-encoding.ts) | hex encoding |
1114
+ | `go:encoding/json` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | JSON encode/decode |
1115
+ | `go:encoding/pem` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | PEM encoding |
1116
+ | `go:encoding/xml` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | XML read/write |
1117
+ | `go:errors` | ✅ | [lib-go-errors.ts](conformance/lib-go-errors.ts) | Error creation / wrapping / inspection |
1118
+ | `go:expvar` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Public process variables |
1119
+ | `go:flag` | ✅ | [lib-go-exec.ts](conformance/lib-go-exec.ts) | Command-line flag parsing |
1120
+ | `go:fmt` | ✅ | [lib-go-fmt.ts](conformance/lib-go-fmt.ts) | Formatted I/O; integer verbs take TS numbers |
1121
+ | `go:go/ast` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go syntax tree |
1122
+ | `go:go/build` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go package build metadata |
1123
+ | `go:go/build/constraint` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Build-tag constraint parsing |
1124
+ | `go:go/constant` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Untyped constant values |
1125
+ | `go:go/doc` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go doc extraction |
1126
+ | `go:go/doc/comment` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Doc comment parse/print |
1127
+ | `go:go/format` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go source formatting |
1128
+ | `go:go/importer` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Export-data type importer |
1129
+ | `go:go/parser` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go source parser |
1130
+ | `go:go/printer` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go AST printer |
1131
+ | `go:go/scanner` | ✅ | [lib-go-gotools-extra.ts](conformance/lib-go-gotools-extra.ts) | Go tokenizer |
1132
+ | `go:go/token` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go tokens / positions |
1133
+ | `go:go/types` | ✅ | [lib-go-gotypes.ts](conformance/lib-go-gotypes.ts) | Go type checker |
1134
+ | `go:go/version` | ✅ | [lib-go-gotools.ts](conformance/lib-go-gotools.ts) | Go version comparison |
1135
+ | `go:hash` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | Hash function interface |
1136
+ | `go:hash/adler32` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | Adler-32 checksum |
1137
+ | `go:hash/crc32` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | CRC-32 checksum |
1138
+ | `go:hash/crc64` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | CRC-64 checksum |
1139
+ | `go:hash/fnv` | ✅ | [lib-go-hash.ts](conformance/lib-go-hash.ts) | FNV-1 / FNV-1a hash |
1140
+ | `go:hash/maphash` | ✅ | [lib-go-hash-extra.ts](conformance/lib-go-hash-extra.ts) | Seeded string hashing |
1141
+ | `go:html` | ✅ | [lib-go-url.ts](conformance/lib-go-url.ts) | HTML escaping |
1142
+ | `go:html/template` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | HTML templating (auto-escaped) |
1143
+ | `go:image` | ✅ | [lib-go-image.ts](conformance/lib-go-image.ts) | 2D image interface |
1144
+ | `go:image/color` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Color types |
1145
+ | `go:image/color/palette` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Standard color palettes |
1146
+ | `go:image/draw` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | Image compositing |
1147
+ | `go:image/gif` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | GIF decode/encode |
1148
+ | `go:image/jpeg` | ✅ | [lib-go-image-extra.ts](conformance/lib-go-image-extra.ts) | JPEG decode/encode |
1149
+ | `go:image/png` | ✅ | [lib-go-image.ts](conformance/lib-go-image.ts) | PNG decode/encode |
1150
+ | `go:index/suffixarray` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Suffix-array substring search |
1151
+ | `go:io` | ✅ | [lib-go-compress-gzip.ts](conformance/lib-go-compress-gzip.ts) | Core I/O interfaces (Reader/Writer) |
1152
+ | `go:io/fs` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Filesystem abstraction |
1153
+ | `go:io/ioutil` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Deprecated I/O helpers (Go 1.16) |
1154
+ | `go:iter` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Range-over-func iterators via `for…of`; `Pull` not bridged |
1155
+ | `go:log` | ✅ | [lib-go-log.ts](conformance/lib-go-log.ts) | Logging to stderr |
1156
+ | `go:log/slog` | ✅ | [lib-go-log.ts](conformance/lib-go-log.ts) | Structured logging |
1157
+ | `go:log/syslog` | ✅ | [lib-go-syslog.ts](conformance/lib-go-syslog.ts) | Network syslog; Unix only (no Windows build, the probe skips it) |
1158
+ | `go:maps` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Generic map helpers |
1159
+ | `go:math` | ✅ | [lib-go-math.ts](conformance/lib-go-math.ts) | Math functions |
1160
+ | `go:math/big` | ✅ | [lib-go-big.ts](conformance/lib-go-big.ts) | Arbitrary-precision arithmetic |
1161
+ | `go:math/bits` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Bit operations |
1162
+ | `go:math/cmplx` | ✅ | [lib-go-math-cmplx.ts](conformance/lib-go-math-cmplx.ts) | `complex128` values pass between calls opaquely |
1163
+ | `go:math/rand` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Pseudo-random numbers |
1164
+ | `go:math/rand/v2` | ✅ | [lib-go-math-extra.ts](conformance/lib-go-math-extra.ts) | Pseudo-random numbers (v2 API) |
1165
+ | `go:mime` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | MIME media types |
1166
+ | `go:mime/multipart` | ✅ | [lib-go-misc.ts](conformance/lib-go-misc.ts) | Multipart forms |
1167
+ | `go:mime/quotedprintable` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | Quoted-printable encoding |
1168
+ | `go:net` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Sockets (loopback TCP), addresses |
1169
+ | `go:net/http` | ✅ | [lib-go-http.ts](conformance/lib-go-http.ts) | HTTP client/server (loopback) |
1170
+ | `go:net/http/cgi` | ✅ | [lib-go-http-extra.ts](conformance/lib-go-http-extra.ts) | CGI request parsing |
1171
+ | `go:net/http/cookiejar` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Cookie jars (loopback) |
1172
+ | `go:net/http/fcgi` | ✅ | [lib-go-fcgi.ts](conformance/lib-go-fcgi.ts) | FastCGI responder serving a TS `http.Handler` class |
1173
+ | `go:net/http/httptest` | ✅ | [lib-go-http.ts](conformance/lib-go-http.ts) | HTTP test servers (loopback) |
1174
+ | `go:net/http/httptrace` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | HTTP tracing hooks |
1175
+ | `go:net/http/httputil` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | HTTP utilities (loopback) |
1176
+ | `go:net/http/pprof` | ✅ | [lib-go-http-extra.ts](conformance/lib-go-http-extra.ts) | pprof HTTP handlers |
1177
+ | `go:net/mail` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | Mail address parsing |
1178
+ | `go:net/netip` | ✅ | [lib-go-encoding-extra.ts](conformance/lib-go-encoding-extra.ts) | IP address types |
1179
+ | `go:net/rpc` | ✅ | [lib-go-rpc.ts](conformance/lib-go-rpc.ts) | TS class services: methods compile to `M(*Args, *Reply) error` |
1180
+ | `go:net/rpc/jsonrpc` | ✅ | [lib-go-rpc.ts](conformance/lib-go-rpc.ts) | JSON-RPC codec (client, server and the wire format) |
1181
+ | `go:net/smtp` | ✅ | [lib-go-smtp.ts](conformance/lib-go-smtp.ts) | SMTP client, against a TS server over loopback |
1182
+ | `go:net/textproto` | ✅ | [lib-go-net.ts](conformance/lib-go-net.ts) | Text protocol I/O |
1183
+ | `go:net/url` | ✅ | [lib-go-url.ts](conformance/lib-go-url.ts) | URL parsing |
1184
+ | `go:os` | ✅ | [lib-go-os.ts](conformance/lib-go-os.ts) | OS files and processes |
1185
+ | `go:os/exec` | ✅ | [lib-go-exec.ts](conformance/lib-go-exec.ts) | External commands |
1186
+ | `go:os/signal` | ✅ | [lib-go-misc.ts](conformance/lib-go-misc.ts) | Signal notification (`Notify` + `Stop`) |
1187
+ | `go:os/user` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | User lookup |
1188
+ | `go:path` | ✅ | [lib-go-path-fs.ts](conformance/lib-go-path-fs.ts) | Slash-separated paths |
1189
+ | `go:path/filepath` | ✅ | [lib-go-os.ts](conformance/lib-go-os.ts) | File paths |
1190
+ | `go:reflect` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Runtime reflection |
1191
+ | `go:regexp` | ✅ | [lib-go-regexp.ts](conformance/lib-go-regexp.ts) | Regular expressions |
1192
+ | `go:regexp/syntax` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Regexp parse trees |
1193
+ | `go:runtime` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Runtime introspection |
1194
+ | `go:runtime/coverage` | ✅ | [lib-go-coverage.ts](conformance/lib-go-coverage.ts) | Needs `--cover`; calls throw without it |
1195
+ | `go:runtime/debug` | ✅ | [lib-go-runtime.ts](conformance/lib-go-runtime.ts) | Stack traces and GC stats |
1196
+ | `go:runtime/metrics` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Runtime metrics sampling |
1197
+ | `go:runtime/pprof` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Profiling data |
1198
+ | `go:runtime/trace` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Execution tracing |
1199
+ | `go:slices` | ✅ | [lib-go-slices.ts](conformance/lib-go-slices.ts) | Generic slice helpers |
1200
+ | `go:sort` | ✅ | [lib-go-sort.ts](conformance/lib-go-sort.ts) | Sorting |
1201
+ | `go:strconv` | ✅ | [lib-go-strconv.ts](conformance/lib-go-strconv.ts) | String conversions |
1202
+ | `go:strings` | ✅ | [lib-go-strings.ts](conformance/lib-go-strings.ts) | String utilities |
1203
+ | `go:structs` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | `HostLayout` marker |
1204
+ | `go:sync` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Mutexes and wait groups |
1205
+ | `go:sync/atomic` | ✅ | [lib-go-sync.ts](conformance/lib-go-sync.ts) | Atomic operations |
1206
+ | `go:syscall` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | Portable subset probed; per-arch constants dropped |
1207
+ | `go:testing` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Helpers usable outside `go test` |
1208
+ | `go:testing/cryptotest` | ✅ | [lib-go-testing-t.ts](conformance/lib-go-testing-t.ts) | Real `*testing.T` via `testing.Main`; refuses outside `go test` |
1209
+ | `go:testing/fstest` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | `TestFS` over any `fs.FS` |
1210
+ | `go:testing/iotest` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Reader/writer test wrappers |
1211
+ | `go:testing/quick` | ✅ | [lib-go-testing.ts](conformance/lib-go-testing.ts) | Property checks with TS callbacks |
1212
+ | `go:testing/slogtest` | ✅ | [lib-go-testing-t.ts](conformance/lib-go-testing-t.ts) | Handler suite: `TestHandler`, and `Run` under `testing.Main` |
1213
+ | `go:testing/synctest` | ✅ | [lib-go-testing-t.ts](conformance/lib-go-testing-t.ts) | Fake-time bubbles under `testing.Main` |
1214
+ | `go:text/scanner` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Text scanner |
1215
+ | `go:text/tabwriter` | ✅ | [lib-go-text.ts](conformance/lib-go-text.ts) | Aligned text columns |
1216
+ | `go:text/template` | ✅ | [lib-go-template.ts](conformance/lib-go-template.ts) | Text templating |
1217
+ | `go:text/template/parse` | ✅ | [lib-go-text-extra.ts](conformance/lib-go-text-extra.ts) | Template parse trees |
1218
+ | `go:time` | ✅ | [lib-go-time.ts](conformance/lib-go-time.ts) | Time and durations |
1219
+ | `go:time/tzdata` | ✅ | [lib-go-runtime-extra.ts](conformance/lib-go-runtime-extra.ts) | Embedded timezone database (side-effect import) |
1220
+ | `go:unicode` | ✅ | [lib-go-unicode.ts](conformance/lib-go-unicode.ts) | Unicode tables |
1221
+ | `go:unicode/utf16` | ✅ | [lib-go-encoding-more.ts](conformance/lib-go-encoding-more.ts) | UTF-16 encoding |
1222
+ | `go:unicode/utf8` | ✅ | [lib-go-unicode.ts](conformance/lib-go-unicode.ts) | UTF-8 encoding |
1223
+ | `go:unique` | ✅ | [lib-go-collections.ts](conformance/lib-go-collections.ts) | Canonical values |
1224
+ | `go:weak` | ✅ | [lib-go-lowlevel.ts](conformance/lib-go-lowlevel.ts) | Weak pointers |
1225
+ | `go:plugin` | 🚫 | — | Loads plugins with `dlopen`: needs cgo and `-buildmode=plugin` (no Windows support) |
1226
+ | `go:unsafe` | 🚫 | — | Raw pointer arithmetic and memory reinterpretation; TS values have no addresses |
1227
+ | `go:runtime/race` | 🚫 | — | No public API: the race detector is a build mode (`-race`) that needs cgo |
1228
+ | `go:runtime/cgo` | 🚫 | — | Links only with cgo and a C toolchain; `Handle` exists to pass Go values to C |
1229
+
1103
1230
  <!-- go-bridges:end -->
1104
1231
 
1105
1232
  #### Go bridge semantics
1106
1233
 
1107
- | Rule | Meaning |
1108
- | ---- | ------- |
1109
- | Number conversion | All Go ints/floats map to TS `number`; args convert via `T(x)`, results read back via `float64(x)`. `int64`/`uint64` beyond 2^53 lose precision. |
1110
- | Throw on error | `(T, error)` results throw a `GoError` on failure; `error`-only calls throw as statements and yield the error value in value position. |
1111
- | Tuples | Multi-value results pack into a slice (TS tuple); `const [a, b] = f()` types each element (ints read as numbers). |
1112
- | Structs | `new pkg.T({...})` builds a composite literal (pointer when any method needs it); fields read/write directly, converting numbers both ways (`h.Size += 1`). Embedded structs promote their fields. |
1113
- | Named numerics | Typed constants (`time.Second`, `reflect.String`) stay typed in Go; arithmetic and `===` coerce the `number` side (`time.Second * 2`). Results read as numbers: `token.Token(n)` restores the methods. |
1114
- | Callbacks | Func-typed params and struct fields become Go closures with the exact Go signature (int params read as numbers, returns convert to the result type); sync callbacks (sort, slices, strings, ...) run inline. |
1115
- | Generics | Type args are inferred from the arguments, including through constraints (`maps.Keys(m)` with `Map ~map[K]V`); unresolved ones become `any`. |
1116
- | printf verbs | With a literal format, numbers passed to `%d %x %o %b %c %U` convert to `int64`; scan into number refs with `%v`. |
1117
- | nil | `null` passes as `nil`; `x === null` on nil-able Go values (slices, maps, interfaces, pointers) is a real nil check. |
1118
- | Channels | `chan<T>(size?)` / `GoChan<T>` with `send`, `recv`, `close`; `for…of` ranges channels, `iter.Seq` and `iter.Seq2` (`for (const [k, v] of seq2)`). |
1119
- | Out-params | `ref<T>(init?)` makes a pointer cell; `.value` dereferences it. |
1120
- | Byte slices | `[]byte` is `Uint8Array` (zero-copy); `number[]` converts per call (mutations of the copy are lost). |
1121
- | Side-effect imports | `import 'go:time/tzdata'` emits a blank `import _`. |
1234
+ | Rule | Meaning |
1235
+ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1236
+ | Number conversion | All Go ints/floats map to TS `number`; args convert via `T(x)`, results read back via `float64(x)`. `int64`/`uint64` beyond 2^53 lose precision. |
1237
+ | Throw on error | `(T, error)` results throw a `GoError` on failure; `error`-only calls throw as statements and yield the error value in value position ([lib-go-bridge-smoke.ts](conformance/lib-go-bridge-smoke.ts)). |
1238
+ | Tuples | Multi-value results pack into a slice (TS tuple); `const [a, b] = f()` types each element (ints read as numbers). |
1239
+ | Structs | `new pkg.T({...})` builds a composite literal (pointer when any method needs it); fields read/write directly, converting numbers both ways (`h.Size += 1`). Embedded structs promote their fields. |
1240
+ | Type annotations | `pkg.T` in an annotation is the Go type (`let d: dwarf.Data \| null = null`, `(t: testing.T) => …`): a struct is a pointer when the package hands out `*T`, a value when it hands out `T` (`time.Time`) ([lib-go-debug.ts](conformance/lib-go-debug.ts)). |
1241
+ | Named numerics | Typed constants (`time.Second`, `reflect.String`) stay typed in Go; arithmetic and `===` coerce the `number` side (`time.Second * 2`). Results read as numbers: `token.Token(n)` restores the methods. |
1242
+ | Callbacks | Func-typed params and struct fields become Go closures with the exact Go signature (int params read as numbers, returns convert to the result type); a `(T, error)` callback returns `T` and a `nil` error; sync callbacks (sort, slices, strings, ...) run inline. |
1243
+ | Generics | Type args are inferred from the arguments, including through constraints (`maps.Keys(m)` with `Map ~map[K]V`); unresolved ones become `any`. |
1244
+ | printf verbs | With a literal format, numbers passed to `%d %x %o %b %c %U` convert to `int64`; scan into number refs with `%v`. |
1245
+ | nil | `null` passes as `nil`; `x === null` on nil-able Go values (slices, maps, interfaces, pointers) is a real nil check. |
1246
+ | Channels | `chan<T>(size?)` (a `chan T`) / `GoChan<T>` with `send`, `recv`, `close`; `for…of` ranges channels, `iter.Seq` and `iter.Seq2` (`for (const [k, v] of seq2)`) ([lib-go-builtin.ts](conformance/lib-go-builtin.ts)). |
1247
+ | Out-params | `ref<T>(init?)` makes a pointer cell; `.value` reads and writes through it, also on `GoRef<T>` params ([lib-go-builtin.ts](conformance/lib-go-builtin.ts), [lib-go-rpc.ts](conformance/lib-go-rpc.ts)). |
1248
+ | Byte slices | `[]byte` is `Uint8Array` (zero-copy); `number[]` converts per call (mutations of the copy are lost). |
1249
+ | Maps | A TS record (`Record<K, V>`) passes where Go takes a `map[K]V` of the same key and value types, as a copy ([lib-go-testing-t.ts](conformance/lib-go-testing-t.ts)). |
1250
+ | Side-effect imports | `import 'go:time/tzdata'` emits a blank `import _`. |
1251
+ | Embedding | `const page = embed.string('./page.html')` (also `embed.bytes`, and `embed.files(...patterns)` for an `embed.FS`) compiles to a package-level `//go:embed` var. Only as a top-level initializer with literal paths, relative to the file; they must stay inside the entry file's directory, and `embed.FS` names are relative to it. The CLI copies the files next to the Go sources ([lib-go-embed.ts](conformance/lib-go-embed.ts)). |
1252
+ | Coverage | `--cover` builds with `-cover -covermode=atomic`, so `go:runtime/coverage` has data to write; set `GOCOVERDIR` to also get a profile at exit ([lib-go-coverage.ts](conformance/lib-go-coverage.ts)). |
1253
+ | Go interfaces | A TS class instance passed where Go expects an interface (`heap.Interface`, `sort.Interface`) is wrapped in a generated adapter with the exact Go method signatures (`Len() int` calls the class's `Len(): number`); the class needs every method, inherited ones count. Values typed as the interface itself are not adapted. |
1122
1254
 
1123
1255
  ### npm packages
1124
1256
 
1125
- | Pattern | Status | Probe | Notes |
1126
- | ------------------------- | :----: | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
1127
- | `import { x } from 'pkg'` | ✅ | [syntax-import-npm.ts](conformance/syntax-import-npm.ts) | Mapped to Go module imports (fixture dep in [conformance/package.json](conformance/package.json)) |
1257
+ | Pattern | Status | Probe | Notes |
1258
+ | ------------------------------------------------------------------------------------------------ | :----: | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1259
+ | `import { x } from 'pkg'` | ✅ | [syntax-import-npm.ts](conformance/syntax-import-npm.ts) | Mapped to Go module imports (fixture dep in [conformance/package.json](conformance/package.json)) |
1260
+ | Packages published as plain JavaScript / CommonJS (tried: `ms`, `escape-html`, `tiny-invariant`) | ❌ | — | Without TypeScript sources there are no types to compile from: untyped packages stop at the type check (TS7016), and typed ones whose code is CommonJS (`module.exports`, union-typed callbacks) don't lower. Packages that ship `.ts` sources work |
1261
+
1262
+ ## Known limitations (🚫)
1263
+
1264
+ These follow from compiling to a native Go binary, and won't change:
1265
+
1266
+ - **No JavaScript engine at runtime**, so code can't be compiled while the program runs: `eval`,
1267
+ `new Function`, `node:vm`, `node:repl`, Worker `eval: true`. Nothing can inspect an engine
1268
+ either: `node:inspector`, `node:v8` heap snapshots and flags, `node:trace_events`, and
1269
+ `node:module` loader hooks.
1270
+ - **Classes are static Go structs** with fixed fields and method sets: no prototype mutation
1271
+ (`C.prototype.m = …`, `Object.setPrototypeOf`, `util.inherits`), no `Proxy` over typed values,
1272
+ no sparse-array holes.
1273
+ - **`undefined` and `null` are both Go `nil`**, so APIs that tell them apart can't (`node:sqlite`
1274
+ binding `undefined`).
1275
+ - **One process per isolate**: workers, `fork` and cluster workers are separate processes, so
1276
+ `SharedArrayBuffer` / `Atomics` can't share memory.
1277
+ - **No cgo**: `go:plugin`, `go:runtime/cgo`, `go:runtime/race` (the race detector), and SQLite
1278
+ native extensions (SQLite runs as Wasm translated to Go).
1279
+ - **No raw memory**: `go:unsafe` reinterprets memory through pointers; TS values have no addresses.
1280
+ - **Deprecated upstream**: `node:domain`, HTTP/2 server push, `util.inherits`.