typenative 0.1.2 → 0.2.0

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 (504) hide show
  1. package/.gitattributes +1 -0
  2. package/.github/workflows/ci.yml +1 -1
  3. package/.github/workflows/npm-publish-github-packages.yml +1 -1
  4. package/CHANGELOG.md +247 -0
  5. package/CONTRIBUTION.md +1 -1
  6. package/README.md +30 -21
  7. package/bin/cli.js +3 -1
  8. package/bin/go/bridge.js +919 -0
  9. package/bin/go/convert.js +238 -0
  10. package/bin/go/metadata.js +211 -0
  11. package/bin/go/overrides.js +68 -0
  12. package/bin/go/stdlib.generated.js +175 -0
  13. package/bin/index.js +98 -6
  14. package/bin/main.js +4 -1
  15. package/bin/node/assert.js +344 -0
  16. package/bin/node/async_hooks.js +273 -0
  17. package/bin/node/buffer.js +765 -0
  18. package/bin/node/child_process.js +600 -0
  19. package/bin/node/cluster.js +1002 -0
  20. package/bin/node/console.js +121 -0
  21. package/bin/node/core.js +111 -0
  22. package/bin/node/crypto.js +414 -0
  23. package/bin/node/crypto_keys.js +2685 -0
  24. package/bin/node/dgram.js +388 -0
  25. package/bin/node/diagnostics_channel.js +534 -0
  26. package/bin/node/dns.js +635 -0
  27. package/bin/node/events.js +743 -0
  28. package/bin/node/fetch.js +737 -0
  29. package/bin/node/fs.js +998 -0
  30. package/bin/node/http.js +1500 -0
  31. package/bin/node/http2.js +688 -0
  32. package/bin/node/net.js +1143 -0
  33. package/bin/node/os.js +257 -0
  34. package/bin/node/path.js +758 -0
  35. package/bin/node/process.js +316 -0
  36. package/bin/node/punycode.js +195 -0
  37. package/bin/node/querystring.js +143 -0
  38. package/bin/node/readline.js +299 -0
  39. package/bin/node/registry.js +161 -0
  40. package/bin/node/sqlite.js +1142 -0
  41. package/bin/node/stream.js +1221 -0
  42. package/bin/node/stream_web.js +2259 -0
  43. package/bin/node/string_decoder.js +101 -0
  44. package/bin/node/system_extra.js +661 -0
  45. package/bin/node/test.js +1068 -0
  46. package/bin/node/timers.js +250 -0
  47. package/bin/node/tls.js +719 -0
  48. package/bin/node/url.js +861 -0
  49. package/bin/node/util.js +1311 -0
  50. package/bin/node/util_extra.js +599 -0
  51. package/bin/node/worker_threads.js +745 -0
  52. package/bin/node/zlib.js +263 -0
  53. package/bin/parse-native.js +3 -2
  54. package/bin/parse-node.js +18 -2
  55. package/bin/transpiler.js +3529 -597
  56. package/bin/version.js +2 -0
  57. package/conformance.md +724 -258
  58. package/govendor/github.com/ncruces/go-sqlite3/LICENSE +21 -0
  59. package/govendor/github.com/ncruces/go-sqlite3/README.md +121 -0
  60. package/govendor/github.com/ncruces/go-sqlite3/backup.go +132 -0
  61. package/govendor/github.com/ncruces/go-sqlite3/blob.go +266 -0
  62. package/govendor/github.com/ncruces/go-sqlite3/config.go +397 -0
  63. package/govendor/github.com/ncruces/go-sqlite3/conn.go +540 -0
  64. package/govendor/github.com/ncruces/go-sqlite3/conn_127.go +93 -0
  65. package/govendor/github.com/ncruces/go-sqlite3/const.go +436 -0
  66. package/govendor/github.com/ncruces/go-sqlite3/context.go +222 -0
  67. package/govendor/github.com/ncruces/go-sqlite3/error.go +182 -0
  68. package/govendor/github.com/ncruces/go-sqlite3/ext.go +153 -0
  69. package/govendor/github.com/ncruces/go-sqlite3/func.go +309 -0
  70. package/govendor/github.com/ncruces/go-sqlite3/go.mod +3 -0
  71. package/govendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk.go +29 -0
  72. package/govendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk_other.go +13 -0
  73. package/govendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk_unix.go +57 -0
  74. package/govendor/github.com/ncruces/go-sqlite3/internal/errutil/error.go +41 -0
  75. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/alloc.go +128 -0
  76. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/const.go +122 -0
  77. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/error.go +77 -0
  78. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem.go +116 -0
  79. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem_other.go +34 -0
  80. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem_unix.go +87 -0
  81. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mem_windows.go +149 -0
  82. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mmap_unix.go +80 -0
  83. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/mmap_windows.go +129 -0
  84. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/sys_windows.go +60 -0
  85. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/wrap.go +82 -0
  86. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/wrap_sys.go +113 -0
  87. package/govendor/github.com/ncruces/go-sqlite3/internal/sqlite3_wrap/wrap_vfs.go +181 -0
  88. package/govendor/github.com/ncruces/go-sqlite3/internal/testenv/env.go +55 -0
  89. package/govendor/github.com/ncruces/go-sqlite3/internal/util/json.go +54 -0
  90. package/govendor/github.com/ncruces/go-sqlite3/internal/util/json_v2.go +54 -0
  91. package/govendor/github.com/ncruces/go-sqlite3/internal/util/math.go +29 -0
  92. package/govendor/github.com/ncruces/go-sqlite3/internal/util/page.go +5 -0
  93. package/govendor/github.com/ncruces/go-sqlite3/internal/util/parse.go +142 -0
  94. package/govendor/github.com/ncruces/go-sqlite3/internal/util/pointer.go +3 -0
  95. package/govendor/github.com/ncruces/go-sqlite3/internal/util/reflect.go +10 -0
  96. package/govendor/github.com/ncruces/go-sqlite3/json.go +100 -0
  97. package/govendor/github.com/ncruces/go-sqlite3/json_v2.go +116 -0
  98. package/govendor/github.com/ncruces/go-sqlite3/pointer.go +13 -0
  99. package/govendor/github.com/ncruces/go-sqlite3/quote.go +140 -0
  100. package/govendor/github.com/ncruces/go-sqlite3/stmt.go +692 -0
  101. package/govendor/github.com/ncruces/go-sqlite3/time.go +360 -0
  102. package/govendor/github.com/ncruces/go-sqlite3/txn.go +374 -0
  103. package/govendor/github.com/ncruces/go-sqlite3/value.go +212 -0
  104. package/govendor/github.com/ncruces/go-sqlite3/vfs/README.md +133 -0
  105. package/govendor/github.com/ncruces/go-sqlite3/vfs/api.go +239 -0
  106. package/govendor/github.com/ncruces/go-sqlite3/vfs/cksm.go +143 -0
  107. package/govendor/github.com/ncruces/go-sqlite3/vfs/const.go +256 -0
  108. package/govendor/github.com/ncruces/go-sqlite3/vfs/file.go +260 -0
  109. package/govendor/github.com/ncruces/go-sqlite3/vfs/filename.go +187 -0
  110. package/govendor/github.com/ncruces/go-sqlite3/vfs/lock.go +128 -0
  111. package/govendor/github.com/ncruces/go-sqlite3/vfs/lock_other.go +23 -0
  112. package/govendor/github.com/ncruces/go-sqlite3/vfs/map.go +63 -0
  113. package/govendor/github.com/ncruces/go-sqlite3/vfs/map_other.go +13 -0
  114. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_bsd.go +110 -0
  115. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_darwin.go +131 -0
  116. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_dotlk.go +140 -0
  117. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_f2fs_linux.go +56 -0
  118. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_linux.go +117 -0
  119. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_ofd.go +59 -0
  120. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std.go +50 -0
  121. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_alloc.go +19 -0
  122. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_atomic.go +9 -0
  123. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_rw.go +13 -0
  124. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_sync.go +9 -0
  125. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_std_temp.go +16 -0
  126. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_unix.go +108 -0
  127. package/govendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go +180 -0
  128. package/govendor/github.com/ncruces/go-sqlite3/vfs/registry.go +48 -0
  129. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm.go +26 -0
  130. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_bsd.go +258 -0
  131. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_copy.go +90 -0
  132. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_dotlk.go +168 -0
  133. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_memlk.go +52 -0
  134. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_ofd.go +185 -0
  135. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_other.go +21 -0
  136. package/govendor/github.com/ncruces/go-sqlite3/vfs/shm_windows.go +124 -0
  137. package/govendor/github.com/ncruces/go-sqlite3/vfs/vfs.go +455 -0
  138. package/govendor/github.com/ncruces/go-sqlite3/vtab.go +677 -0
  139. package/govendor/github.com/ncruces/go-sqlite3/wrap.go +48 -0
  140. package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/LICENSE +18 -0
  141. package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/README.md +11 -0
  142. package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/go.mod +3 -0
  143. package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/libc.go +215 -0
  144. package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/sqlite3.dat +0 -0
  145. package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/sqlite3.go +157903 -0
  146. package/govendor/github.com/ncruces/go-sqlite3-wasm/v6/tools.sh +38 -0
  147. package/govendor/github.com/ncruces/julianday/LICENSE +21 -0
  148. package/govendor/github.com/ncruces/julianday/README.md +9 -0
  149. package/govendor/github.com/ncruces/julianday/go.mod +3 -0
  150. package/govendor/github.com/ncruces/julianday/julianday.go +124 -0
  151. package/govendor/golang.org/x/sys/LICENSE +27 -0
  152. package/govendor/golang.org/x/sys/PATENTS +22 -0
  153. package/govendor/golang.org/x/sys/go.mod +3 -0
  154. package/govendor/golang.org/x/sys/unix/README.md +184 -0
  155. package/govendor/golang.org/x/sys/unix/affinity_linux.go +189 -0
  156. package/govendor/golang.org/x/sys/unix/aliases.go +13 -0
  157. package/govendor/golang.org/x/sys/unix/asm_aix_ppc64.s +17 -0
  158. package/govendor/golang.org/x/sys/unix/asm_bsd_386.s +27 -0
  159. package/govendor/golang.org/x/sys/unix/asm_bsd_amd64.s +27 -0
  160. package/govendor/golang.org/x/sys/unix/asm_bsd_arm.s +27 -0
  161. package/govendor/golang.org/x/sys/unix/asm_bsd_arm64.s +27 -0
  162. package/govendor/golang.org/x/sys/unix/asm_bsd_ppc64.s +29 -0
  163. package/govendor/golang.org/x/sys/unix/asm_bsd_riscv64.s +27 -0
  164. package/govendor/golang.org/x/sys/unix/asm_linux_386.s +65 -0
  165. package/govendor/golang.org/x/sys/unix/asm_linux_amd64.s +57 -0
  166. package/govendor/golang.org/x/sys/unix/asm_linux_arm.s +56 -0
  167. package/govendor/golang.org/x/sys/unix/asm_linux_arm64.s +50 -0
  168. package/govendor/golang.org/x/sys/unix/asm_linux_loong64.s +51 -0
  169. package/govendor/golang.org/x/sys/unix/asm_linux_mips64x.s +54 -0
  170. package/govendor/golang.org/x/sys/unix/asm_linux_mipsx.s +52 -0
  171. package/govendor/golang.org/x/sys/unix/asm_linux_ppc64x.s +42 -0
  172. package/govendor/golang.org/x/sys/unix/asm_linux_riscv64.s +47 -0
  173. package/govendor/golang.org/x/sys/unix/asm_linux_s390x.s +54 -0
  174. package/govendor/golang.org/x/sys/unix/asm_openbsd_mips64.s +29 -0
  175. package/govendor/golang.org/x/sys/unix/asm_solaris_amd64.s +17 -0
  176. package/govendor/golang.org/x/sys/unix/asm_zos_s390x.s +382 -0
  177. package/govendor/golang.org/x/sys/unix/auxv.go +36 -0
  178. package/govendor/golang.org/x/sys/unix/auxv_unsupported.go +13 -0
  179. package/govendor/golang.org/x/sys/unix/bluetooth_linux.go +36 -0
  180. package/govendor/golang.org/x/sys/unix/bpxsvc_zos.go +657 -0
  181. package/govendor/golang.org/x/sys/unix/bpxsvc_zos.s +192 -0
  182. package/govendor/golang.org/x/sys/unix/cap_freebsd.go +195 -0
  183. package/govendor/golang.org/x/sys/unix/constants.go +13 -0
  184. package/govendor/golang.org/x/sys/unix/dev_aix_ppc.go +26 -0
  185. package/govendor/golang.org/x/sys/unix/dev_aix_ppc64.go +28 -0
  186. package/govendor/golang.org/x/sys/unix/dev_darwin.go +24 -0
  187. package/govendor/golang.org/x/sys/unix/dev_dragonfly.go +30 -0
  188. package/govendor/golang.org/x/sys/unix/dev_freebsd.go +30 -0
  189. package/govendor/golang.org/x/sys/unix/dev_linux.go +42 -0
  190. package/govendor/golang.org/x/sys/unix/dev_netbsd.go +29 -0
  191. package/govendor/golang.org/x/sys/unix/dev_openbsd.go +29 -0
  192. package/govendor/golang.org/x/sys/unix/dev_zos.go +28 -0
  193. package/govendor/golang.org/x/sys/unix/dirent.go +102 -0
  194. package/govendor/golang.org/x/sys/unix/endian_big.go +9 -0
  195. package/govendor/golang.org/x/sys/unix/endian_little.go +9 -0
  196. package/govendor/golang.org/x/sys/unix/env_unix.go +31 -0
  197. package/govendor/golang.org/x/sys/unix/fcntl.go +36 -0
  198. package/govendor/golang.org/x/sys/unix/fcntl_darwin.go +24 -0
  199. package/govendor/golang.org/x/sys/unix/fcntl_linux_32bit.go +13 -0
  200. package/govendor/golang.org/x/sys/unix/fdset.go +27 -0
  201. package/govendor/golang.org/x/sys/unix/gccgo.go +59 -0
  202. package/govendor/golang.org/x/sys/unix/gccgo_c.c +44 -0
  203. package/govendor/golang.org/x/sys/unix/gccgo_linux_amd64.go +20 -0
  204. package/govendor/golang.org/x/sys/unix/ifreq_linux.go +145 -0
  205. package/govendor/golang.org/x/sys/unix/ioctl_linux.go +341 -0
  206. package/govendor/golang.org/x/sys/unix/ioctl_signed.go +74 -0
  207. package/govendor/golang.org/x/sys/unix/ioctl_unsigned.go +74 -0
  208. package/govendor/golang.org/x/sys/unix/ioctl_zos.go +71 -0
  209. package/govendor/golang.org/x/sys/unix/mkall.sh +250 -0
  210. package/govendor/golang.org/x/sys/unix/mkerrors.sh +807 -0
  211. package/govendor/golang.org/x/sys/unix/mmap_nomremap.go +13 -0
  212. package/govendor/golang.org/x/sys/unix/mremap.go +57 -0
  213. package/govendor/golang.org/x/sys/unix/pagesize_unix.go +15 -0
  214. package/govendor/golang.org/x/sys/unix/pledge_openbsd.go +111 -0
  215. package/govendor/golang.org/x/sys/unix/ptrace_darwin.go +11 -0
  216. package/govendor/golang.org/x/sys/unix/ptrace_ios.go +11 -0
  217. package/govendor/golang.org/x/sys/unix/race.go +30 -0
  218. package/govendor/golang.org/x/sys/unix/race0.go +25 -0
  219. package/govendor/golang.org/x/sys/unix/readdirent_getdents.go +12 -0
  220. package/govendor/golang.org/x/sys/unix/readdirent_getdirentries.go +19 -0
  221. package/govendor/golang.org/x/sys/unix/readv_unix.go +103 -0
  222. package/govendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go +16 -0
  223. package/govendor/golang.org/x/sys/unix/sockcmsg_linux.go +85 -0
  224. package/govendor/golang.org/x/sys/unix/sockcmsg_unix.go +106 -0
  225. package/govendor/golang.org/x/sys/unix/sockcmsg_unix_other.go +46 -0
  226. package/govendor/golang.org/x/sys/unix/sockcmsg_zos.go +58 -0
  227. package/govendor/golang.org/x/sys/unix/symaddr_zos_s390x.s +75 -0
  228. package/govendor/golang.org/x/sys/unix/syscall.go +86 -0
  229. package/govendor/golang.org/x/sys/unix/syscall_aix.go +582 -0
  230. package/govendor/golang.org/x/sys/unix/syscall_aix_ppc.go +52 -0
  231. package/govendor/golang.org/x/sys/unix/syscall_aix_ppc64.go +83 -0
  232. package/govendor/golang.org/x/sys/unix/syscall_bsd.go +609 -0
  233. package/govendor/golang.org/x/sys/unix/syscall_darwin.go +711 -0
  234. package/govendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +50 -0
  235. package/govendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +50 -0
  236. package/govendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go +26 -0
  237. package/govendor/golang.org/x/sys/unix/syscall_dragonfly.go +359 -0
  238. package/govendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go +56 -0
  239. package/govendor/golang.org/x/sys/unix/syscall_freebsd.go +455 -0
  240. package/govendor/golang.org/x/sys/unix/syscall_freebsd_386.go +64 -0
  241. package/govendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go +64 -0
  242. package/govendor/golang.org/x/sys/unix/syscall_freebsd_arm.go +60 -0
  243. package/govendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go +60 -0
  244. package/govendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go +60 -0
  245. package/govendor/golang.org/x/sys/unix/syscall_hurd.go +30 -0
  246. package/govendor/golang.org/x/sys/unix/syscall_hurd_386.go +28 -0
  247. package/govendor/golang.org/x/sys/unix/syscall_illumos.go +78 -0
  248. package/govendor/golang.org/x/sys/unix/syscall_linux.go +2574 -0
  249. package/govendor/golang.org/x/sys/unix/syscall_linux_386.go +313 -0
  250. package/govendor/golang.org/x/sys/unix/syscall_linux_alarm.go +12 -0
  251. package/govendor/golang.org/x/sys/unix/syscall_linux_amd64.go +144 -0
  252. package/govendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go +12 -0
  253. package/govendor/golang.org/x/sys/unix/syscall_linux_arm.go +218 -0
  254. package/govendor/golang.org/x/sys/unix/syscall_linux_arm64.go +188 -0
  255. package/govendor/golang.org/x/sys/unix/syscall_linux_gc.go +14 -0
  256. package/govendor/golang.org/x/sys/unix/syscall_linux_gc_386.go +16 -0
  257. package/govendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go +13 -0
  258. package/govendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go +30 -0
  259. package/govendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go +20 -0
  260. package/govendor/golang.org/x/sys/unix/syscall_linux_loong64.go +220 -0
  261. package/govendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +187 -0
  262. package/govendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +173 -0
  263. package/govendor/golang.org/x/sys/unix/syscall_linux_ppc.go +203 -0
  264. package/govendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +114 -0
  265. package/govendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +193 -0
  266. package/govendor/golang.org/x/sys/unix/syscall_linux_s390x.go +295 -0
  267. package/govendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +111 -0
  268. package/govendor/golang.org/x/sys/unix/syscall_netbsd.go +388 -0
  269. package/govendor/golang.org/x/sys/unix/syscall_netbsd_386.go +37 -0
  270. package/govendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go +37 -0
  271. package/govendor/golang.org/x/sys/unix/syscall_netbsd_arm.go +37 -0
  272. package/govendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go +37 -0
  273. package/govendor/golang.org/x/sys/unix/syscall_openbsd.go +346 -0
  274. package/govendor/golang.org/x/sys/unix/syscall_openbsd_386.go +41 -0
  275. package/govendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go +41 -0
  276. package/govendor/golang.org/x/sys/unix/syscall_openbsd_arm.go +41 -0
  277. package/govendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go +41 -0
  278. package/govendor/golang.org/x/sys/unix/syscall_openbsd_libc.go +26 -0
  279. package/govendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go +39 -0
  280. package/govendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go +41 -0
  281. package/govendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go +41 -0
  282. package/govendor/golang.org/x/sys/unix/syscall_solaris.go +1183 -0
  283. package/govendor/golang.org/x/sys/unix/syscall_solaris_amd64.go +27 -0
  284. package/govendor/golang.org/x/sys/unix/syscall_unix.go +619 -0
  285. package/govendor/golang.org/x/sys/unix/syscall_unix_gc.go +14 -0
  286. package/govendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go +22 -0
  287. package/govendor/golang.org/x/sys/unix/syscall_zos_s390x.go +3213 -0
  288. package/govendor/golang.org/x/sys/unix/sysvshm_linux.go +20 -0
  289. package/govendor/golang.org/x/sys/unix/sysvshm_unix.go +51 -0
  290. package/govendor/golang.org/x/sys/unix/sysvshm_unix_other.go +13 -0
  291. package/govendor/golang.org/x/sys/unix/timestruct.go +76 -0
  292. package/govendor/golang.org/x/sys/unix/unveil_openbsd.go +51 -0
  293. package/govendor/golang.org/x/sys/unix/vgetrandom_linux.go +13 -0
  294. package/govendor/golang.org/x/sys/unix/vgetrandom_unsupported.go +11 -0
  295. package/govendor/golang.org/x/sys/unix/xattr_bsd.go +280 -0
  296. package/govendor/golang.org/x/sys/unix/zerrors_aix_ppc.go +1384 -0
  297. package/govendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go +1385 -0
  298. package/govendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +1922 -0
  299. package/govendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +1922 -0
  300. package/govendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go +1737 -0
  301. package/govendor/golang.org/x/sys/unix/zerrors_freebsd_386.go +2042 -0
  302. package/govendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go +2039 -0
  303. package/govendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go +2033 -0
  304. package/govendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go +2033 -0
  305. package/govendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go +2147 -0
  306. package/govendor/golang.org/x/sys/unix/zerrors_linux.go +4209 -0
  307. package/govendor/golang.org/x/sys/unix/zerrors_linux_386.go +882 -0
  308. package/govendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +882 -0
  309. package/govendor/golang.org/x/sys/unix/zerrors_linux_arm.go +887 -0
  310. package/govendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +884 -0
  311. package/govendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +874 -0
  312. package/govendor/golang.org/x/sys/unix/zerrors_linux_mips.go +888 -0
  313. package/govendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +888 -0
  314. package/govendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +888 -0
  315. package/govendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +888 -0
  316. package/govendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +940 -0
  317. package/govendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +944 -0
  318. package/govendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +944 -0
  319. package/govendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +884 -0
  320. package/govendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +943 -0
  321. package/govendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +992 -0
  322. package/govendor/golang.org/x/sys/unix/zerrors_netbsd_386.go +1779 -0
  323. package/govendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go +1769 -0
  324. package/govendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go +1758 -0
  325. package/govendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go +1769 -0
  326. package/govendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +1905 -0
  327. package/govendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +1905 -0
  328. package/govendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +1905 -0
  329. package/govendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go +1905 -0
  330. package/govendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go +1905 -0
  331. package/govendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go +1904 -0
  332. package/govendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go +1903 -0
  333. package/govendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go +1556 -0
  334. package/govendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +990 -0
  335. package/govendor/golang.org/x/sys/unix/zptrace_armnn_linux.go +40 -0
  336. package/govendor/golang.org/x/sys/unix/zptrace_linux_arm64.go +17 -0
  337. package/govendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go +49 -0
  338. package/govendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go +49 -0
  339. package/govendor/golang.org/x/sys/unix/zptrace_x86_linux.go +79 -0
  340. package/govendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s +364 -0
  341. package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go +1461 -0
  342. package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go +1420 -0
  343. package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go +1188 -0
  344. package/govendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go +1069 -0
  345. package/govendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +2728 -0
  346. package/govendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +799 -0
  347. package/govendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +2728 -0
  348. package/govendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +799 -0
  349. package/govendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +1666 -0
  350. package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +1886 -0
  351. package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +1886 -0
  352. package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +1886 -0
  353. package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +1886 -0
  354. package/govendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go +1886 -0
  355. package/govendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go +101 -0
  356. package/govendor/golang.org/x/sys/unix/zsyscall_linux.go +2267 -0
  357. package/govendor/golang.org/x/sys/unix/zsyscall_linux_386.go +469 -0
  358. package/govendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +636 -0
  359. package/govendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +584 -0
  360. package/govendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +535 -0
  361. package/govendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go +469 -0
  362. package/govendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +636 -0
  363. package/govendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +630 -0
  364. package/govendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +619 -0
  365. package/govendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +636 -0
  366. package/govendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go +641 -0
  367. package/govendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +687 -0
  368. package/govendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +687 -0
  369. package/govendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +531 -0
  370. package/govendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +478 -0
  371. package/govendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +631 -0
  372. package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +1848 -0
  373. package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +1848 -0
  374. package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +1848 -0
  375. package/govendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +1848 -0
  376. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +2407 -0
  377. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +719 -0
  378. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +2407 -0
  379. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +719 -0
  380. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +2407 -0
  381. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +719 -0
  382. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +2407 -0
  383. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +719 -0
  384. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +2407 -0
  385. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +719 -0
  386. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +2407 -0
  387. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +862 -0
  388. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +2407 -0
  389. package/govendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +719 -0
  390. package/govendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +2217 -0
  391. package/govendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +3458 -0
  392. package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go +280 -0
  393. package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go +280 -0
  394. package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go +280 -0
  395. package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go +280 -0
  396. package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go +280 -0
  397. package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go +280 -0
  398. package/govendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go +281 -0
  399. package/govendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go +439 -0
  400. package/govendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go +437 -0
  401. package/govendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go +316 -0
  402. package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go +393 -0
  403. package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go +393 -0
  404. package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go +393 -0
  405. package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go +393 -0
  406. package/govendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go +393 -0
  407. package/govendor/golang.org/x/sys/unix/zsysnum_linux_386.go +470 -0
  408. package/govendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +394 -0
  409. package/govendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +434 -0
  410. package/govendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +337 -0
  411. package/govendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +334 -0
  412. package/govendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +454 -0
  413. package/govendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +384 -0
  414. package/govendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +384 -0
  415. package/govendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +454 -0
  416. package/govendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +461 -0
  417. package/govendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +433 -0
  418. package/govendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +433 -0
  419. package/govendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +338 -0
  420. package/govendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +399 -0
  421. package/govendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +413 -0
  422. package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go +274 -0
  423. package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go +274 -0
  424. package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go +274 -0
  425. package/govendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go +274 -0
  426. package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go +219 -0
  427. package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go +219 -0
  428. package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go +219 -0
  429. package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go +218 -0
  430. package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go +221 -0
  431. package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go +217 -0
  432. package/govendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go +218 -0
  433. package/govendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go +2852 -0
  434. package/govendor/golang.org/x/sys/unix/ztypes_aix_ppc.go +353 -0
  435. package/govendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go +357 -0
  436. package/govendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +878 -0
  437. package/govendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +878 -0
  438. package/govendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +473 -0
  439. package/govendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +651 -0
  440. package/govendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +656 -0
  441. package/govendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +642 -0
  442. package/govendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +636 -0
  443. package/govendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +638 -0
  444. package/govendor/golang.org/x/sys/unix/ztypes_linux.go +6547 -0
  445. package/govendor/golang.org/x/sys/unix/ztypes_linux_386.go +747 -0
  446. package/govendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +761 -0
  447. package/govendor/golang.org/x/sys/unix/ztypes_linux_arm.go +741 -0
  448. package/govendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +740 -0
  449. package/govendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +741 -0
  450. package/govendor/golang.org/x/sys/unix/ztypes_linux_mips.go +746 -0
  451. package/govendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +743 -0
  452. package/govendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +743 -0
  453. package/govendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +746 -0
  454. package/govendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +754 -0
  455. package/govendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +749 -0
  456. package/govendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +749 -0
  457. package/govendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +828 -0
  458. package/govendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +763 -0
  459. package/govendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +744 -0
  460. package/govendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +585 -0
  461. package/govendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +593 -0
  462. package/govendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +590 -0
  463. package/govendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go +593 -0
  464. package/govendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +568 -0
  465. package/govendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +568 -0
  466. package/govendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +575 -0
  467. package/govendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go +568 -0
  468. package/govendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go +568 -0
  469. package/govendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go +570 -0
  470. package/govendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go +570 -0
  471. package/govendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go +516 -0
  472. package/govendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +552 -0
  473. package/govendor/golang.org/x/sys/windows/aliases.go +13 -0
  474. package/govendor/golang.org/x/sys/windows/dll_windows.go +380 -0
  475. package/govendor/golang.org/x/sys/windows/env_windows.go +57 -0
  476. package/govendor/golang.org/x/sys/windows/eventlog.go +20 -0
  477. package/govendor/golang.org/x/sys/windows/exec_windows.go +248 -0
  478. package/govendor/golang.org/x/sys/windows/memory_windows.go +48 -0
  479. package/govendor/golang.org/x/sys/windows/mkerrors.bash +70 -0
  480. package/govendor/golang.org/x/sys/windows/mkknownfolderids.bash +27 -0
  481. package/govendor/golang.org/x/sys/windows/mksyscall.go +9 -0
  482. package/govendor/golang.org/x/sys/windows/race.go +30 -0
  483. package/govendor/golang.org/x/sys/windows/race0.go +25 -0
  484. package/govendor/golang.org/x/sys/windows/security_windows.go +1537 -0
  485. package/govendor/golang.org/x/sys/windows/service.go +257 -0
  486. package/govendor/golang.org/x/sys/windows/setupapi_windows.go +1425 -0
  487. package/govendor/golang.org/x/sys/windows/str.go +22 -0
  488. package/govendor/golang.org/x/sys/windows/syscall.go +104 -0
  489. package/govendor/golang.org/x/sys/windows/syscall_windows.go +1952 -0
  490. package/govendor/golang.org/x/sys/windows/types_windows.go +4058 -0
  491. package/govendor/golang.org/x/sys/windows/types_windows_386.go +35 -0
  492. package/govendor/golang.org/x/sys/windows/types_windows_amd64.go +34 -0
  493. package/govendor/golang.org/x/sys/windows/types_windows_arm.go +35 -0
  494. package/govendor/golang.org/x/sys/windows/types_windows_arm64.go +34 -0
  495. package/govendor/golang.org/x/sys/windows/zerrors_windows.go +9468 -0
  496. package/govendor/golang.org/x/sys/windows/zknownfolderids_windows.go +149 -0
  497. package/govendor/golang.org/x/sys/windows/zsyscall_windows.go +4828 -0
  498. package/govendor/manifest.txt +7 -0
  499. package/package.json +6 -1
  500. package/tsparser/main.go +37 -3
  501. package/tsparser/tsparser.exe +2 -2
  502. package/types/typenative-go.d.ts +15159 -5
  503. package/types/typenative-npm.d.ts +2637 -30
  504. package/types/typenative.d.ts +1092 -56
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ govendor/** linguist-vendored
@@ -17,7 +17,7 @@ jobs:
17
17
 
18
18
  - uses: actions/setup-go@v5
19
19
  with:
20
- go-version: '1.23'
20
+ go-version: '1.26'
21
21
 
22
22
  - run: npm ci
23
23
 
@@ -27,7 +27,7 @@ jobs:
27
27
  node-version: 24
28
28
  - uses: actions/setup-go@v5
29
29
  with:
30
- go-version: '1.23'
30
+ go-version: '1.26'
31
31
  - run: npm ci
32
32
  - run: npm ci
33
33
  working-directory: conformance
package/CHANGELOG.md CHANGED
@@ -5,6 +5,253 @@ All notable changes to TypeNative will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [0.2.0] - 2026-10-18
11
+
12
+ The Go standard-library bridge (`go:*` imports) goes from 73 to 154 probed packages, with 16
13
+ left typed-only and 6 excluded. Most of the new coverage came with bridge fixes found by the
14
+ probes: callbacks, generics, tuples, struct fields and constants now behave the way the
15
+ generated types say they do.
16
+
17
+ ### Added
18
+
19
+ - **Go probes**: compress (flate, zlib, lzw, bzip2), archive/tar, encoding (json, base32,
20
+ ascii85, asn1), mime/quotedprintable, unicode/utf16, hash (adler32, crc64, maphash), crypto
21
+ (sha3, hkdf, pbkdf2, des, rc4, fips140, ecdh, ecdsa, elliptic, mlkem, mlkemtest, x509, pkix,
22
+ tls metadata, dsa, hpke), fmt, path, io/fs, io/ioutil, maps, iter, unique, weak, structs,
23
+ image (color, palette, draw, gif, jpeg), go/* (parser, ast, scanner, printer, constant,
24
+ build, build/constraint, doc, doc/comment, types, importer), html/template,
25
+ text/template/parse, regexp/syntax, reflect, net (loopback TCP, textproto, cookiejar,
26
+ httputil, httptrace, pprof, cgi), runtime (metrics, pprof, trace), time/tzdata, os/user,
27
+ debug/buildinfo, math/big, testing (testing, fstest, iotest, quick), database/sql (+driver),
28
+ syscall
29
+ - **Go generics**: type args are inferred recursively from the arguments and through constraint
30
+ core types (`Map ~map[K]V`); callback params of generic functions and methods on generic
31
+ receivers (`unique.Handle[T].Value`) are concrete
32
+ - **Go callbacks**: TS closures passed to Go (params or struct fields) get the exact Go
33
+ signature — int params read as numbers, block bodies work, returns convert to the result type
34
+ - `for (const [k, v] of seq2)` over `iter.Seq2`; destructuring multi-value Go calls types each
35
+ element; printf-style calls pass numbers to `%d %x %o %b %c %U` as `int64`
36
+ - `String.indexOf(search, fromIndex)`
37
+ - `npm run check:go-types` type-checks the `go:*` probes against `types/typenative-go.d.ts`
38
+ - **Node networking**: `node:net` (TCP / Unix servers and sockets as duplex streams, Node's
39
+ `ECONNREFUSED`-style errors, `isIP`), `node:dns` (+ `dns/promises`), `node:http` /
40
+ `node:https` (servers on `net/http`, `request` / `get`, `STATUS_CODES`, `METHODS`),
41
+ `node:tls` (Node's certificate checks and error codes, `getPeerCertificate`), `node:dgram`,
42
+ and the global `fetch` with `Headers` / `Request` / `Response`
43
+ - **`node:async_hooks`**: `AsyncLocalStorage` and `AsyncResource`; the event loop carries an
44
+ async context through timers, `nextTick`, microtasks, promise callbacks, awaits, fs / dns
45
+ callbacks, streams and servers
46
+ - **`node:test`**: `test` / `describe` / `it` with hooks, subtests, skip / todo, timeouts and
47
+ `mock.fn`; Node's TAP (or, on a terminal, spec) report and exit code
48
+ - **`node:worker_threads`**: workers re-run the program as child processes linked over
49
+ loopback TCP (structured-clone messages, `workerData`, `terminate`, errors), plus
50
+ `MessageChannel` / `MessagePort` / `BroadcastChannel`; globals `__filename` / `__dirname`
51
+ - `new Promise((resolve) => setTimeout(resolve, ms))`: `resolve` / `reject` can be passed as
52
+ values
53
+ - **`node:stream/web`**: `ReadableStream` / `WritableStream` / `TransformStream` with readers,
54
+ writers, controllers, queuing strategies, `tee` / `pipeTo` / `pipeThrough` and `for await`;
55
+ `TextEncoderStream` / `TextDecoderStream`, `CompressionStream` / `DecompressionStream` (also
56
+ globals); `Readable.toWeb` / `fromWeb` & co. and `stream.compose`
57
+ - `Blob` / `File` (`node:buffer` and globals) and `FormData`; fetch streams bodies
58
+ (`response.body`, `ReadableStream` uploads), sends Blob / FormData bodies and reads
59
+ `blob()` / `formData()`
60
+ - `TextDecoder#decode(bytes, { stream: true })`
61
+ - **`node:crypto`**: `scrypt` / `scryptSync`; callback forms of `pbkdf2`, `hkdf`,
62
+ `randomBytes`, `randomFill`; `KeyObject` with `createPrivateKey` / `createPublicKey` /
63
+ `createSecretKey` and PEM / DER / JWK import and export; `generateKeyPair(Sync)` (RSA, EC,
64
+ Ed25519, X25519) and `generateKey(Sync)`; `sign` / `verify`, `createSign` / `createVerify`
65
+ (PKCS#1 v1.5, PSS, ECDSA DER / P1363, Ed25519); `publicEncrypt` & co.; ECDH and classic
66
+ Diffie-Hellman (MODP groups); `generatePrime` / `checkPrime`; `X509Certificate`; and
67
+ `crypto.subtle` (digest, keys, sign / verify, AES-GCM / CBC / CTR, RSA-OAEP, PBKDF2 / HKDF /
68
+ ECDH / X25519 derivation, wrap / unwrap)
69
+ - **`child_process.fork`** with an IPC channel (`send` / `'message'` / `disconnect`;
70
+ `process.send` / `process.on('message')` in the child) and **`node:cluster`**: workers share
71
+ listening ports through the primary, which relays connections round-robin; cluster and worker
72
+ events, `disconnect`, `setupPrimary`
73
+ - **`node:http2`** on `net/http`'s HTTP/2: h2c and TLS servers with the `'stream'` API
74
+ (`respond`, `respondWithFile`) and the compatibility `(req, res)` API; `connect()` client
75
+ sessions whose `request()` streams emit `'response'` with `:status`
76
+ - `path.matchesGlob`; Buffer `read/writeBig(U)Int64LE/BE`, `swap16/32/64`, `buffer.isUtf8` /
77
+ `isAscii` / `transcode`; `util.parseArgs`, `getSystemErrorName` / `Message` / `Map`,
78
+ `MIMEType`, `parseEnv`, `aborted`, `debuglog`, `toUSVString`; `process.loadEnvFile`
79
+ - `process.on('uncaughtException' | 'uncaughtExceptionMonitor' | 'unhandledRejection' |
80
+ 'beforeExit')`, `process.cpuUsage` / `resourceUsage` / `availableMemory`; `os.totalmem` /
81
+ `freemem` / `uptime` / `loadavg` / `release` / `version`; timer handles with `ref` / `unref` /
82
+ `hasRef` / `refresh` / `close`; `PerformanceObserver`, `performance.timerify` /
83
+ `eventLoopUtilization`, `createHistogram`, `monitorEventLoopDelay`; `events.errorMonitor`,
84
+ `captureRejections`, static `getMaxListeners` / `setMaxListeners`, `addAbortListener`
85
+ - zlib callback forms (`gzip(buf, [options], cb)` & co.) and `util.promisify` of them;
86
+ `readline.cursorTo` / `moveCursor` / `clearLine` / `clearScreenDown`;
87
+ `diagnostics_channel.tracingChannel` (`traceSync` / `tracePromise` / `traceCallback`) and
88
+ `channel.bindStore` / `runStores`; `net.BlockList` / `SocketAddress`; `dns.Resolver` (own
89
+ servers, `timeout`, `cancel`), `setServers`, `lookupService`; `tls.checkServerIdentity` (and
90
+ the `connect` option); HTTP `'upgrade'` / `'connect'` on servers and clients; node:test
91
+ `t.assert` and `mock.timers`; `console.table`
92
+ - `new Error(message, { cause })` / `err.cause`; fetch refuses the Fetch standard's bad ports;
93
+ `net.Stream` and the `autoSelectFamily` defaults
94
+ - **`node:sqlite`**: `DatabaseSync` / `StatementSync` (`run` / `get` / `all` / `iterate`, named
95
+ and bare parameters, `readBigInts`, `returnArrays`, `columns()`, `expandedSQL`), `function()`,
96
+ `aggregate()` (window functions), `setAuthorizer`, `limits`, `createTagStore()`, `backup()`,
97
+ and Node 24's error codes and messages. SQLite comes from github.com/ncruces/go-sqlite3 (Wasm
98
+ translated to Go: no cgo), vendored in `govendor/` by `npm run vendor:go` so builds need no
99
+ network. `loadExtension`, sessions and `serialize` are not available
100
+ - conformance.md gives each unsupported Node module (`vm`, `repl`, `inspector`, …) its own section
101
+
102
+ ### Fixed
103
+
104
+ - **Go types**: void functions were typed as returning `GoError`; params now accept what the
105
+ bridge converts (`number[]` for `[]byte`, one-char strings for `byte`/`rune`, `null` for
106
+ nil-able types, an array for variadics, an optional trailing `error`); pointers to basics are
107
+ `GoRef<T>`; typed constants keep their named type; aliases resolve (`os.FileMode`); named
108
+ slice/map types keep their methods (`net.IP`); `iter.Seq` is iterable; unimportable
109
+ `*/internal` packages are dropped and `runtime/cgo` is excluded
110
+ - **Go bridge**: path-qualified types (`net/http.Cookie`) are localized and imported; unused
111
+ type-only imports are dropped and `import 'go:pkg'` emits `import _`; field reads/writes
112
+ convert numbers on any receiver; `null` comparisons on nil-able Go values are real nil checks;
113
+ `===` with typed constants coerces; `ref<T>().value` dereferences; `json.Unmarshal` fills a
114
+ `Record` ref
115
+ - `npm run gen:go` runs from the repo root again
116
+ - The self-hosted compiler (`npm run build:native`) builds again; the `src/go/*` modules are
117
+ transpilable by TypeNative
118
+ - Object literals whose keys aren't identifiers (`{ 'Content-Type': … }`) compile (as records)
119
+ - `const { a, b } = f()` evaluates `f()` once
120
+ - `await` inside async arrow callbacks no longer blocks the event loop (every `await` goes
121
+ through `TnAwait`)
122
+ - `JSON.parse` assigned to an interface type converts into its struct (it was `nil`); typed
123
+ callback parameters accept decoded JSON-like values
124
+ - `for await` over a stream that errors throws the error (it ended the loop silently)
125
+ - `const { value, done } = obj` on Node class instances types the bindings (and reads
126
+ accessors); `x as File` asserts dynamic values to Node classes
127
+ - `Response#clone()` of a network body no longer blocks the event loop (both copies stream it)
128
+ - The self-hosted compiler no longer crashes on `const [a, b] = call()`
129
+ - A detached top-level async call with arguments (`run(a, b);`) passes them (they were dropped)
130
+ - A function that only returns `undefined` compiles (its result type was `nil`)
131
+ - `gunzip` of data without a gzip header fails with `incorrect header check`, as in Node
132
+ - Error properties declared by both `NodeJS.ErrnoException` and `AssertionError` no longer hide
133
+ each other (`(e.cause as Error).message` typed the cause as unknown)
134
+ - Negative bigint literals and `-x` on bigints; hex / octal / binary bigint literals;
135
+ `p.then(() => …)` on a `Promise<void>`; `JSON.stringify` of records keeps their keys (it
136
+ printed the map's internals); `String(x)` / template literals use a Node class's `toString()`
137
+ - Top-level variables named like an imported Go package (`rsa`, `pem`, `encoding`, `http`, …) are
138
+ renamed instead of clashing with it; `bigint.toString(radix)`; `ArrayBuffer` annotations and
139
+ `byteLength` on Buffers
140
+ - Object literals with `$` in a key (`{ $id: 1 }`) compile (as records); `rows as Row[]` on an
141
+ array of dynamic values converts each element; records held in dynamic values read their keys
142
+ (`row.name`, `row['name']`, `Object.keys(row)`, `row as Row`); `bytes[i]` on a dynamic
143
+ `Uint8Array`; `x === 1n` when `x` is `number | bigint`
144
+ - `arr.reduce(…)` has a result type (functions returning it compiled without a return value); a
145
+ typed arrow parameter is no longer mistaken for an earlier variable of the same name
146
+ - `(c) => (body += c)` arrow bodies; `console.log(x?.y)` prints optional strings / numbers
147
+ without quotes; the self-hosted compiler no longer crashes on `console.log` arguments of
148
+ unknown type
149
+
150
+ ## [0.1.3] - 2026-10-15
151
+
152
+ Decorators and JSX arrive alongside a broad language-surface expansion (`using`, `new.target`,
153
+ `for await`, namespaces, dynamic `import()`), and `types/typenative.d.ts` grows into a complete
154
+ lib replacement. The conformance suite grows to 241 probes — including its first `.tsx` probe —
155
+ and passes fully through the dev CLI.
156
+
157
+ ### Added
158
+
159
+ - **Language**: `using` declarations — `[Symbol.dispose]()` runs when the enclosing block or
160
+ function exits, in reverse declaration order; `new.target` (constructors pass the target class
161
+ name through `super()` chains); `for await...of`; the `arguments` object; namespaces; computed
162
+ and heterogeneous enums; callable/construct signatures (`type F = { (): void }` — a class passed
163
+ as a value is its constructor); ambient declarations (`declare const` / `declare function` /
164
+ `declare module`); string, numeric and boolean literal types (single literals, unions,
165
+ literal-union `Record` keys)
166
+ - **Decorators**: standard method and class decorators — decorator factories (`@tag('x')`),
167
+ stacked decorators, static methods — applied where the class is defined; `this` in the wrapper
168
+ is the decorated method's receiver; `f.call` / `f.apply`
169
+ - **JSX**: `.tsx` files render JSX to HTML strings — text is escaped, void tags self-close
170
+ (`<br/>`), components are called with their props, `className` maps to `class`, boolean
171
+ attribute shorthand (`disabled`) and fragments flatten; both parsers take a tsx flag and
172
+ `.tsx` imports resolve
173
+ - **Modules**: re-exports (`export { x } from './y'`), side-effect imports (`import './x'`),
174
+ dynamic `import()` (async), `import x = require('y')`; top-level statements of imported
175
+ modules execute through a generated `init()`
176
+ - **Typing**: rest-parameter function types `(...args: T[]) => R` become variadic Go func types
177
+ - **Library**: `String.normalize` — backed by `golang.org/x/text/unicode/norm`, vendored from
178
+ GOROOT's vendor tree via a `replace` in `dist/go.mod`, so builds need no network; object
179
+ literals of method-bearing interfaces; `new Set([...spread])`
180
+ - **Type definitions**: `types/typenative.d.ts` expands by ~500 lines — `Generator`/`AsyncGenerator`
181
+ and the `Iterable`/`AsyncIterable` families, `Disposable`, `Awaited`, `TemplateStringsArray`,
182
+ `ArrayLike`, real mapped types for `Partial`/`Required`/`Readonly`/`Pick`/`Omit`/`Record`,
183
+ `RegExpExecArray`, constructor interfaces (`Array`/`String`/`Number`) and the `JSX` namespace
184
+ - **Project config**: `types/tsconfig.json` — a standalone `lib: []` project for the
185
+ lib-replacement d.ts, so editors don't load es5 libs alongside it (TS6200, duplicate identifiers)
186
+
187
+ ### Changed
188
+
189
+ - The conformance runner picks up `.tsx` probes; scaffolds pin `typenative ^0.1.3`; `dist/`
190
+ cleanup also removes stale `go.mod`/`go.sum`
191
+ - Both parsers emit `declarationKind` (`var`/`let`/`const`/`using`/`await using`) on variable
192
+ declaration lists; tsparser takes `--tsx` and emits `JsxText`
193
+ - README rewritten: requirements, quick start, CLI reference, and expanded language/stdlib tables
194
+
195
+ ## [0.1.2] - 2026-10-13
196
+
197
+ The type system and standard library catch up with the conformance matrix: generics gain
198
+ constraints, defaults and generic interfaces; utility types, `keyof`/`typeof`, intersections,
199
+ conditional types and mapped types lower to Go; Promise, timer, Object, collection and math
200
+ built-ins round out. The conformance suite grows to 219 probes (including 15 for rows that
201
+ already worked — `console.error`/`warn`, `Map`/`Set.clear`, `node:url`, `process.cwd`, `split`
202
+ with a RegExp, access modifiers, `const enum`, `import type`, indexed access types, literal
203
+ types, hex/octal/binary literals, `override`, template literal types, `var`) and passes fully
204
+ through the dev CLI; the stage-1/stage-2 bootstrap fixpoint holds.
205
+
206
+ ### Added
207
+
208
+ - **Generics**: constraints (`T extends U`), defaults (`T = U`), generic interfaces, class
209
+ expressions, index signatures, `keyof` and mapped types
210
+ - **Type operators**: `keyof T`, `typeof x`, `readonly T[]`, intersections `A & B` (merged into
211
+ one struct), conditional types (`T extends U ? X : Y`) with `infer`, `void`/`never`/`object`,
212
+ the `void` operator, `satisfies`
213
+ - **Utility types**: `Partial`, `Required`, `Readonly`, `Pick`, `Omit`, `NonNullable` (lowered to
214
+ the base type)
215
+ - **Language**: async generators (`async function*` driven by `for await`), labeled tuple
216
+ elements with optional and rest members (`[x: number, y?: string, ...rest: number[]]`),
217
+ overload signatures, `this: T` parameters, `asserts x is T`, optional call `f?.()` (checks the
218
+ function value; the result is nullable), comma-separated declarators/updates in `for` headers
219
+ (`for (let i = 0, j = 10; …; i++, j--)` via Go's parallel forms), import renaming
220
+ (`import { a as b }`), `static { … }` blocks → `func init()`, self-referencing arrow functions
221
+ (`const f = (…) => … f(…) …`)
222
+ - **Promises & timers**: `Promise.prototype.reject`/`catch`/`finally`, combinators
223
+ `race`/`allSettled`/`any`, `Promise.resolve`; `setTimeout` returns a handle that `clearTimeout`
224
+ stops; `setInterval`; `queueMicrotask`
225
+ - **Objects**: `Object.hasOwn`, `Object.defineProperty`, `Object.fromEntries`, integrity methods
226
+ (`freeze`/`seal`/`preventExtensions`)
227
+ - **Collections**: `WeakMap`/`WeakSet`; ES2024 `Set` operations (`union`, `intersection`,
228
+ `difference`, `isSubsetOf`, …); array `concat` (flattens one level), `copyWithin`, `toSpliced`,
229
+ `toSorted`, `toReversed`, `with`, `reduceRight`; `any` receivers accept the newer array methods
230
+ through array-only method casts
231
+ - **Strings, numbers, regex**: `String.raw`, `toPrecision`, `String()`/`Boolean()` with JS
232
+ formatting and truthiness; regex `y`/`u` flags and `.source`/`.flags`
233
+ - **Globals**: `globalThis`, `structuredClone`, `isFinite`, `encodeURIComponent`/
234
+ `decodeURIComponent`; `Math` constants (`PI`, `E`, `SQRT2`, …) and `hypot`/`cbrt`/`expm1`/
235
+ `log1p`/hyperbolics/inverse trig/`atan2`
236
+ - **Date**: `getUTC*` getters and `Date.UTC`
237
+ - **Semantics**: functions stored in `Record`s are called as values — `rec.fn(args)` lowers to
238
+ `rec.Get("fn")(args)` (previously dispatched as a built-in method, so `handlers.sort(x)` ran an
239
+ array sort); names that are also JS `Map` methods stay Map methods unless the receiver is typed
240
+ as a `Record`; dynamic `obj[key] = v` writes; mixed array literals (`[['a', 1]]`) become
241
+ `[]interface{}`
242
+
243
+ ### Changed
244
+
245
+ - tsparser emits the raw text of template literals
246
+
247
+ ### Fixed
248
+
249
+ - `JSON.stringify` no longer HTML-escapes `<`, `>`, `&` in the reflection path (`json.Marshal`
250
+ produced `\u003c`); stage 1 and stage 2 of the bootstrap generate identical Go again
251
+ - `Date.toISOString` printed the month twice (`2006-01-01` instead of `2006-01-02`)
252
+ - `??` passed to a nullable parameter is boxed; object literals nested in dynamic objects stay
253
+ dynamic; shorthand properties (`{ x }`) read narrowed variables correctly
254
+
8
255
  ## [0.1.1] - 2026-10-10
9
256
 
10
257
  The conformance suite is fully green: all 147 probes pass (up from 95/147), through both the dev
package/CONTRIBUTION.md CHANGED
@@ -66,7 +66,7 @@ The `.d.ts` files are the type-checking contract for user code. If your feature
66
66
 
67
67
  - `types/typenative.d.ts` — core JS subset (`Array`, `Map`, `Set`, `JSON`, `Math`, `RegExp`, …).
68
68
  - `types/typenative-npm.d.ts` — `node:*` shims (`fs`, `path`, `os`, `child_process`, …).
69
- - `types/typenative-go.d.ts` — `go:*` bridges (`fmt`, `strings`, `strconv`).
69
+ - `types/typenative-go.d.ts` — `go:*` bridges. Generated from the Go standard library by `npm run gen:go` (`scripts/gostd`), which also rewrites the Go table in conformance.md; never edit it by hand. `npm run check:go-types` type-checks the `lib-go-*` probes against it.
70
70
 
71
71
  No signature → user code won't type-check → the feature doesn't exist.
72
72
 
package/README.md CHANGED
@@ -32,7 +32,7 @@ npx typenative --source hello.ts --script
32
32
  ## Requirements
33
33
 
34
34
  - [Node.js v24](https://nodejs.org/en) or newer.
35
- - [Go 1.26](https://go.dev/doc/install) or newer.
35
+ - [Go 1.26](https://go.dev/doc/install) or newer
36
36
 
37
37
  ## Install
38
38
 
@@ -105,12 +105,15 @@ Scaffolded `tsconfig.json` targets the TypeNative type surface:
105
105
  {
106
106
  "compilerOptions": {
107
107
  "target": "es2020",
108
- "strict": true,
109
- "types": ["typenative", "typenative/go", "typenative/npm"]
108
+ "lib": [],
109
+ "types": ["typenative", "typenative/go", "typenative/npm"],
110
+ "strict": true
110
111
  }
111
112
  }
112
113
  ```
113
114
 
115
+ `lib: []` disables the standard TypeScript libraries, so `typenative`'s own declarations are the entire type surface — the compiler only accepts what actually transpiles.
116
+
114
117
  ## CLI reference
115
118
 
116
119
  | Flag | Mode | Description |
@@ -128,24 +131,30 @@ TypeNative supports a growing subset of TypeScript, not the whole language. The
128
131
 
129
132
  **Language highlights that work today:**
130
133
 
131
- - `let`/`const`, functions, arrow functions, closures, recursion, rest/spread, default and optional params, destructured params.
132
- - Classes (inheritance, static members, getters, parameter properties, abstract, `implements`), interfaces, type aliases, generics, enums (numeric + string).
133
- - `if`/`switch` (incl. fallthrough), `for`/`for...of`/`while`/`do...while`, `try`/`catch`/`finally` (`throw` → `panic`, catch via `defer`/`recover`), ternaries, optional chaining, nullish coalescing, `in`, `typeof`, `instanceof`.
134
- - `async`/`await`, generators, custom iterators, tagged templates.
134
+ - `let`/`const`, functions, arrow functions, closures, recursion, rest/spread, default and optional params, destructured params, `arguments`.
135
+ - Classes (inheritance, static members/blocks, getters/setters, parameter properties, abstract, `implements`, decorators on classes and methods), interfaces, type aliases, generics (constraints, defaults), namespaces, enums (numeric, string, computed, `const`), tuples.
136
+ - `if`/`switch` (incl. fallthrough), `for`/`for...of`/`for...in`/`while`/`do...while`, labeled loops, `try`/`catch`/`finally` (`throw` → `panic`, catch via `defer`/`recover`), ternaries, optional chaining, nullish coalescing (`??`/`??=`), `in`, `typeof`, `instanceof`, `delete`, logical assignment.
137
+ - `async`/`await`, generators and async generators (`for await`), custom iterators (`*[Symbol.iterator]()`), tagged templates (`String.raw`), `using` (`[Symbol.dispose]`), `new.target`, `import.meta.url`, `import = require` / `export =`, dynamic `import()`.
138
+ - Type system: literal and template-literal types, union/intersection types, conditional types with `infer`, `keyof`/mapped/indexed-access types, utility types (`Partial`, `Readonly`, `Pick`, `Omit`, `Required`, `NonNullable`, `Record`), `as const`, `satisfies`, type guards (`p is T`), assertion functions.
139
+ - Runtime values: `bigint` literals (`2n ** 64n`) and `symbol` keys.
140
+ - JSX: `.tsx` files render to HTML strings.
135
141
 
136
142
  **Standard library that works today:**
137
143
 
138
- | Area | What to use |
139
- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
140
- | Console | `console.log`, `assert` (→ `panic` on failure) |
141
- | `Array` | `push`/`pop`, `slice`/`splice`, `map`/`filter`/`reduce`, `find`/`some`/`every`, `sort` with comparator, `flat`/`flatMap`, `at`, `entries`, `join`, `reverse`, `shift`/`unshift` |
142
- | `Object` | `assign`, `keys`/`values`/`entries`, spread of records → Go maps |
143
- | `String` | `split`/`slice`/`replace`, `padStart`/`padEnd`, `repeat`, search/compare, char codes, unicode |
144
- | `Number`/`Math` | `parseInt`/`parseFloat`, `toFixed`/`toString(radix)`, `isInteger`/`isNaN`, `min`/`max`/`random` |
145
- | `Map`/`Set` | Full `set`/`get`/`has`/`delete`/`size` plus `for...of` iteration (→ Go maps) |
146
- | `JSON` | `parse` / `stringify` |
147
- | `RegExp` | Literals + `new RegExp()`, `test()`, `exec()` with groups, `i`/`m` flags (backreferences, named groups, stateful `/g` loops and lookbehind are not supported — Go `regexp` limitation) |
148
- | `process` | `argv` (→ `os.Args`), `platform` (→ `runtime.GOOS`), `env` |
144
+ | Area | What to use |
145
+ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
146
+ | Console | `console.log`/`error`/`warn`, `console.time`/`timeEnd`, `assert` (→ `panic` on failure) |
147
+ | `Array` | `push`/`pop`, `shift`/`unshift`, `slice`/`splice`/`concat`, `map`/`filter`/`reduce`/`reduceRight`, `find`/`findLast`/`findIndex`/`findLastIndex`, `some`/`every`/`forEach`/`includes`/`indexOf`/`lastIndexOf`, `sort` with comparator, `flat`/`flatMap`, `fill`, `at`, `entries`, `join`, `reverse`, change-by-copy (`toSorted`/`toReversed`/`toSpliced`/`with`/`copyWithin`), `Array.from`, `Array.isArray`, `new Array<T>(n)` |
148
+ | `Object` | `assign`, `keys`/`values`/`entries`, `fromEntries`, `hasOwn`, `defineProperty`, `getOwnPropertyNames`, integrity (`freeze`/`seal`/`preventExtensions` + `isFrozen`/`isSealed`/`isExtensible`), spread of records → Go maps |
149
+ | `String` | `split`/`slice`/`replace`/`replaceAll`, `padStart`/`padEnd`, `repeat`, `match`/`matchAll`/`search`, `includes`/`startsWith`/`endsWith`, `indexOf`/`lastIndexOf`, char codes (`charAt`/`charCodeAt`/`fromCharCode`), `at`, `trim`/`trimStart`/`trimEnd`, `normalize`, `localeCompare`, `String.raw` |
150
+ | `Number`/`Math` | `parseInt`/`parseFloat`, `toFixed`/`toPrecision`/`toString(radix)`, `Number.isInteger`/`isNaN`/`isFinite` + `MAX_SAFE_INTEGER` & friends, full `Math` (trig, hyperbolic, `log*`, `cbrt`/`hypot`, `min`/`max` incl. spread, constants) |
151
+ | `Map`/`Set` | Full `set`/`get`/`has`/`delete`/`clear`/`size`, `forEach`, `keys`/`values`, `for...of` iteration (→ ordered Go maps), Set operations (`union`/`intersection`/`difference`/`symmetricDifference`/`isSubsetOf`/`isSupersetOf`/`isDisjointFrom`), `WeakMap`/`WeakSet` |
152
+ | `Promise` | `new Promise` (resolve + reject), `then`/`catch`/`finally`, `resolve`/`reject`, `all`/`race`/`allSettled`/`any` (→ goroutines over channels) |
153
+ | `Date` | `new Date()` / `new Date(ms)`, `getTime`/`valueOf`, local + UTC getters, `toISOString`/`toDateString`/`toTimeString`, `Date.now()`, `Date.UTC()` |
154
+ | `JSON` | `parse` / `stringify` |
155
+ | `RegExp` | Literals + `new RegExp()`, `test()`, `exec()` with named groups (`.groups`), flags `i`/`m`/`s`/`g`/`y`/`u`, stateful `lastIndex` for `/g` loops, `source`/`flags`/`global`/... properties. Backreferences, lookahead and lookbehind run on a small backtracking engine (RE2 does not support them) |
156
+ | Globals | `setTimeout`/`clearTimeout`, `setInterval`/`clearInterval`, `queueMicrotask`, `structuredClone`, `globalThis`, `encodeURIComponent`/`decodeURIComponent`, `isNaN`/`isFinite`, `NaN`/`Infinity` |
157
+ | `process` | `argv`, `platform` (→ Node-style names), `env`, `cwd`, `exit`, `exitCode`, `hrtime`, `stdout`/`stderr`/`stdin`, `on('exit')`, … (see [node:process](conformance.md#nodeprocess)) |
149
158
 
150
159
  **Node built-ins (import with the `node:` prefix, mapped to Go helpers):**
151
160
 
@@ -160,7 +169,7 @@ fs.readFileSync('file.txt', 'utf-8');
160
169
  childProcess.spawnSync('go', ['version'], { encoding: 'utf-8' });
161
170
  ```
162
171
 
163
- Supported: `node:path` (`join`, `dirname`, `basename`, `extname`, `resolve`), `node:fs` (`read/write/append/exists/mkdir/readdir/copy/rm`), `node:os` (`platform`, `homedir`, `tmpdir`), `node:child_process` (sync `exec`/`execSync`/`spawnSync`/`spawnInherit` shape). `node:readline.question()` exists as a TypeNative sync extension for self-hosted prompts.
172
+ Supported: `path`, `fs` (sync, callbacks, `fs/promises`, streams), `os`, `process`, `buffer`, `url` (`URL`, `URLSearchParams`), `util`, `assert`, `crypto` (hashes, ciphers, keys, signatures, `X509Certificate`, `crypto.subtle`), `zlib`, `events`, `stream` (+ `stream/web`: `ReadableStream` & co.), `readline`, `child_process` (with `fork` / IPC), `cluster`, `timers`, `perf_hooks`, `querystring`, `string_decoder`, networking (`net`, `dns`, `http`, `https`, `http2`, `tls`, `dgram`, global `fetch` with `Blob` / `FormData`), `async_hooks` (`AsyncLocalStorage`), `diagnostics_channel` (with `tracingChannel`), `test` (the `node:test` runner, with `mock.timers`), `worker_threads` (workers as child processes) and `sqlite` (`DatabaseSync` on a bundled pure-Go SQLite: no cgo, no network at build time) and more, with Node's signatures (import as `node:x` or `x`). Callbacks, timers and I/O run on one event loop, as in Node. `node:readline.question()` exists as a TypeNative sync extension for self-hosted prompts. Per-API status: [conformance.md](conformance.md#node-builtins-node).
164
173
 
165
174
  **Direct Go access (import with the `go:` prefix):**
166
175
 
@@ -171,7 +180,7 @@ import { ToUpper } from 'go:strings';
171
180
  Println(Sprintf('hi %s', ToUpper('bob')));
172
181
  ```
173
182
 
174
- Supported: `go:fmt` (`Println`, `Sprintf`), `go:strings` (`ToUpper`, `ToLower`), `go:strconv` (`FormatBool`).
183
+ Any Go package can be imported this way (`import { X } from 'go:pkg'` → `pkg.X` with numeric conversion and throw-on-error results). The full standard library is declared for typechecking (`npm run gen:go`), with 154 packages probed — see [conformance.md](conformance.md#go-bridges-gostar).
175
184
 
176
185
  **npm packages:**
177
186
 
@@ -231,7 +240,7 @@ main.ts --(parse)--> normalized JSON AST --(transpileToNative)--> dist/code.go -
231
240
 
232
241
  - **Parse:** Node CLI uses the `typescript` npm package (`src/parse-node.ts`); the self-hosted binary spawns the Go `tsparser` tool (`src/parse-native.ts`). Both emit the same `{ kind: "Xxx", ... }` JSON shape so one transpiler consumes either.
233
242
  - **Transpile:** `transpileToNative(code, { parse, readFile })` in `src/transpiler.ts` lowers the AST to Go, resolving relative and npm imports into additional Go files (`TranspileResult { main, files }`).
234
- - **Build:** `run()` in `src/index.ts` writes `dist/code.go` (+ one Go file per module), cleans stale `dist/*.go`, shells out to `go build -o dist/native(.exe)`, then either executes it (`--script`, stdio inherited) or copies it to `--output`.
243
+ - **Build:** `run()` in `src/index.ts` writes `dist/code.go` (+ one Go file per module), cleans stale `dist/*.go`, shells out to `go build -o dist/native(.exe)`, then either executes it (`--script`, stdio inherited) or copies it to `--output`. Third-party Go modules a program needs (`node:sqlite`'s driver, shipped in `govendor/`; `golang.org/x/text`, copied from GOROOT) are copied under `dist/tnvendor` and wired in with `replace` directives in `dist/go.mod`, so builds stay offline.
235
244
 
236
245
  ## Testing and conformance
237
246
 
package/bin/cli.js CHANGED
@@ -2,6 +2,7 @@
2
2
  // Node CLI entry point (npm `bin`). Interactive prompts use inquirer here;
3
3
  // the actual compiler logic lives in the transpilable src/index.ts.
4
4
  import inquirer from 'inquirer';
5
+ import { fileURLToPath } from 'node:url';
5
6
  import { run, createProject } from './index.js';
6
7
  import { parseAstJson } from './parse-node.js';
7
8
  (async function main() {
@@ -57,6 +58,7 @@ import { parseAstJson } from './parse-node.js';
57
58
  output: output ?? answers.output ?? null,
58
59
  scriptMode,
59
60
  tsCode: answers.tsCode ?? null,
60
- parse: parseAstJson
61
+ parse: parseAstJson,
62
+ vendorDir: fileURLToPath(new URL('../govendor', import.meta.url))
61
63
  });
62
64
  })();