@blazetrails/ruby-compat 0.0.0-stage → 0.1.0-alpha0.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 (622) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +6 -0
  3. package/README.md +440 -2
  4. package/dist/argument-error.d.ts +15 -0
  5. package/dist/argument-error.js +15 -0
  6. package/dist/argument-error.js.map +1 -0
  7. package/dist/array.d.ts +415 -0
  8. package/dist/array.js +1330 -0
  9. package/dist/array.js.map +1 -0
  10. package/dist/async-context-adapter.d.ts +19 -0
  11. package/dist/async-context-adapter.js +139 -0
  12. package/dist/async-context-adapter.js.map +1 -0
  13. package/dist/backtrace-location.d.ts +77 -0
  14. package/dist/backtrace-location.js +155 -0
  15. package/dist/backtrace-location.js.map +1 -0
  16. package/dist/base64.d.ts +73 -0
  17. package/dist/base64.js +164 -0
  18. package/dist/base64.js.map +1 -0
  19. package/dist/benchmark.d.ts +19 -0
  20. package/dist/benchmark.js +16 -0
  21. package/dist/benchmark.js.map +1 -0
  22. package/dist/big-decimal.d.ts +110 -0
  23. package/dist/big-decimal.js +582 -0
  24. package/dist/big-decimal.js.map +1 -0
  25. package/dist/bundler.d.ts +44 -0
  26. package/dist/bundler.js +101 -0
  27. package/dist/bundler.js.map +1 -0
  28. package/dist/cgi.d.ts +89 -0
  29. package/dist/cgi.js +168 -0
  30. package/dist/cgi.js.map +1 -0
  31. package/dist/child-process-adapter.d.ts +110 -0
  32. package/dist/child-process-adapter.js +272 -0
  33. package/dist/child-process-adapter.js.map +1 -0
  34. package/dist/class-module.d.ts +10 -0
  35. package/dist/class-module.js +10 -0
  36. package/dist/class-module.js.map +1 -0
  37. package/dist/classpath.d.ts +90 -0
  38. package/dist/classpath.js +207 -0
  39. package/dist/classpath.js.map +1 -0
  40. package/dist/closed-queue-error.d.ts +10 -0
  41. package/dist/closed-queue-error.js +10 -0
  42. package/dist/closed-queue-error.js.map +1 -0
  43. package/dist/comparable.d.ts +127 -0
  44. package/dist/comparable.js +376 -0
  45. package/dist/comparable.js.map +1 -0
  46. package/dist/complex.d.ts +48 -0
  47. package/dist/complex.js +162 -0
  48. package/dist/complex.js.map +1 -0
  49. package/dist/concurrent/atomic-boolean.d.ts +24 -0
  50. package/dist/concurrent/atomic-boolean.js +43 -0
  51. package/dist/concurrent/atomic-boolean.js.map +1 -0
  52. package/dist/concurrent/atomic-fixnum.d.ts +21 -0
  53. package/dist/concurrent/atomic-fixnum.js +35 -0
  54. package/dist/concurrent/atomic-fixnum.js.map +1 -0
  55. package/dist/concurrent/count-down-latch.d.ts +20 -0
  56. package/dist/concurrent/count-down-latch.js +50 -0
  57. package/dist/concurrent/count-down-latch.js.map +1 -0
  58. package/dist/concurrent/cyclic-barrier.d.ts +18 -0
  59. package/dist/concurrent/cyclic-barrier.js +50 -0
  60. package/dist/concurrent/cyclic-barrier.js.map +1 -0
  61. package/dist/concurrent/event.d.ts +19 -0
  62. package/dist/concurrent/event.js +31 -0
  63. package/dist/concurrent/event.js.map +1 -0
  64. package/dist/concurrent/map.d.ts +149 -0
  65. package/dist/concurrent/map.js +202 -0
  66. package/dist/concurrent/map.js.map +1 -0
  67. package/dist/concurrent/read-write-lock.d.ts +25 -0
  68. package/dist/concurrent/read-write-lock.js +70 -0
  69. package/dist/concurrent/read-write-lock.js.map +1 -0
  70. package/dist/concurrent/semaphore.d.ts +24 -0
  71. package/dist/concurrent/semaphore.js +74 -0
  72. package/dist/concurrent/semaphore.js.map +1 -0
  73. package/dist/concurrent/timer-task.d.ts +52 -0
  74. package/dist/concurrent/timer-task.js +112 -0
  75. package/dist/concurrent/timer-task.js.map +1 -0
  76. package/dist/constants.generated.d.ts +2 -0
  77. package/dist/constants.generated.js +64 -0
  78. package/dist/constants.generated.js.map +1 -0
  79. package/dist/converter-not-found-error.d.ts +14 -0
  80. package/dist/converter-not-found-error.js +14 -0
  81. package/dist/converter-not-found-error.js.map +1 -0
  82. package/dist/crypto-adapter.d.ts +64 -0
  83. package/dist/crypto-adapter.js +365 -0
  84. package/dist/crypto-adapter.js.map +1 -0
  85. package/dist/delegate.d.ts +156 -0
  86. package/dist/delegate.js +306 -0
  87. package/dist/delegate.js.map +1 -0
  88. package/dist/digest.d.ts +99 -0
  89. package/dist/digest.js +131 -0
  90. package/dist/digest.js.map +1 -0
  91. package/dist/dir.d.ts +218 -0
  92. package/dist/dir.js +599 -0
  93. package/dist/dir.js.map +1 -0
  94. package/dist/encoding-error.d.ts +14 -0
  95. package/dist/encoding-error.js +17 -0
  96. package/dist/encoding-error.js.map +1 -0
  97. package/dist/encoding.d.ts +121 -0
  98. package/dist/encoding.js +306 -0
  99. package/dist/encoding.js.map +1 -0
  100. package/dist/ensure.d.ts +15 -0
  101. package/dist/ensure.js +35 -0
  102. package/dist/ensure.js.map +1 -0
  103. package/dist/enumerable.d.ts +375 -0
  104. package/dist/enumerable.js +1100 -0
  105. package/dist/enumerable.js.map +1 -0
  106. package/dist/enumerator.d.ts +321 -0
  107. package/dist/enumerator.js +642 -0
  108. package/dist/enumerator.js.map +1 -0
  109. package/dist/eof-error.d.ts +14 -0
  110. package/dist/eof-error.js +14 -0
  111. package/dist/eof-error.js.map +1 -0
  112. package/dist/errno.d.ts +327 -0
  113. package/dist/errno.js +452 -0
  114. package/dist/errno.js.map +1 -0
  115. package/dist/exc-detailed-message.d.ts +15 -0
  116. package/dist/exc-detailed-message.js +106 -0
  117. package/dist/exc-detailed-message.js.map +1 -0
  118. package/dist/exc-to-s.d.ts +10 -0
  119. package/dist/exc-to-s.js +21 -0
  120. package/dist/exc-to-s.js.map +1 -0
  121. package/dist/exception.d.ts +34 -0
  122. package/dist/exception.js +99 -0
  123. package/dist/exception.js.map +1 -0
  124. package/dist/fiber-error.d.ts +12 -0
  125. package/dist/fiber-error.js +12 -0
  126. package/dist/fiber-error.js.map +1 -0
  127. package/dist/fiber.d.ts +51 -0
  128. package/dist/fiber.js +178 -0
  129. package/dist/fiber.js.map +1 -0
  130. package/dist/file-utils.d.ts +480 -0
  131. package/dist/file-utils.js +1823 -0
  132. package/dist/file-utils.js.map +1 -0
  133. package/dist/file.d.ts +635 -0
  134. package/dist/file.js +1312 -0
  135. package/dist/file.js.map +1 -0
  136. package/dist/float-domain-error.d.ts +17 -0
  137. package/dist/float-domain-error.js +17 -0
  138. package/dist/float-domain-error.js.map +1 -0
  139. package/dist/fork-children.d.ts +23 -0
  140. package/dist/fork-children.js +32 -0
  141. package/dist/fork-children.js.map +1 -0
  142. package/dist/frozen-error.d.ts +33 -0
  143. package/dist/frozen-error.js +42 -0
  144. package/dist/frozen-error.js.map +1 -0
  145. package/dist/fs-adapter.d.ts +158 -0
  146. package/dist/fs-adapter.js +253 -0
  147. package/dist/fs-adapter.js.map +1 -0
  148. package/dist/gem/deprecate.d.ts +10 -0
  149. package/dist/gem/deprecate.js +8 -0
  150. package/dist/gem/deprecate.js.map +1 -0
  151. package/dist/gem/requirement.d.ts +64 -0
  152. package/dist/gem/requirement.js +91 -0
  153. package/dist/gem/requirement.js.map +1 -0
  154. package/dist/gem/version.d.ts +50 -0
  155. package/dist/gem/version.js +148 -0
  156. package/dist/gem/version.js.map +1 -0
  157. package/dist/gem.d.ts +59 -0
  158. package/dist/gem.js +82 -0
  159. package/dist/gem.js.map +1 -0
  160. package/dist/hash.d.ts +967 -0
  161. package/dist/hash.js +1572 -0
  162. package/dist/hash.js.map +1 -0
  163. package/dist/http-adapter.d.ts +123 -0
  164. package/dist/http-adapter.js +220 -0
  165. package/dist/http-adapter.js.map +1 -0
  166. package/dist/immediate-executor.d.ts +20 -0
  167. package/dist/immediate-executor.js +39 -0
  168. package/dist/immediate-executor.js.map +1 -0
  169. package/dist/include.d.ts +778 -0
  170. package/dist/include.js +2195 -0
  171. package/dist/include.js.map +1 -0
  172. package/dist/index-error.d.ts +13 -0
  173. package/dist/index-error.js +13 -0
  174. package/dist/index-error.js.map +1 -0
  175. package/dist/index.d.ts +174 -0
  176. package/dist/index.js +166 -0
  177. package/dist/index.js.map +1 -0
  178. package/dist/invalid-byte-sequence-error.d.ts +62 -0
  179. package/dist/invalid-byte-sequence-error.js +75 -0
  180. package/dist/invalid-byte-sequence-error.js.map +1 -0
  181. package/dist/io-error.d.ts +14 -0
  182. package/dist/io-error.js +17 -0
  183. package/dist/io-error.js.map +1 -0
  184. package/dist/io.d.ts +867 -0
  185. package/dist/io.js +1960 -0
  186. package/dist/io.js.map +1 -0
  187. package/dist/ipaddr.d.ts +79 -0
  188. package/dist/ipaddr.js +405 -0
  189. package/dist/ipaddr.js.map +1 -0
  190. package/dist/json.d.ts +67 -0
  191. package/dist/json.js +185 -0
  192. package/dist/json.js.map +1 -0
  193. package/dist/kernel-catch.d.ts +59 -0
  194. package/dist/kernel-catch.js +184 -0
  195. package/dist/kernel-catch.js.map +1 -0
  196. package/dist/kernel-float.d.ts +19 -0
  197. package/dist/kernel-float.js +54 -0
  198. package/dist/kernel-float.js.map +1 -0
  199. package/dist/kernel-fork.d.ts +30 -0
  200. package/dist/kernel-fork.js +72 -0
  201. package/dist/kernel-fork.js.map +1 -0
  202. package/dist/kernel-format.d.ts +27 -0
  203. package/dist/kernel-format.js +901 -0
  204. package/dist/kernel-format.js.map +1 -0
  205. package/dist/kernel-hash.d.ts +7 -0
  206. package/dist/kernel-hash.js +33 -0
  207. package/dist/kernel-hash.js.map +1 -0
  208. package/dist/kernel-integer.d.ts +49 -0
  209. package/dist/kernel-integer.js +170 -0
  210. package/dist/kernel-integer.js.map +1 -0
  211. package/dist/kernel-rand.d.ts +16 -0
  212. package/dist/kernel-rand.js +237 -0
  213. package/dist/kernel-rand.js.map +1 -0
  214. package/dist/kernel-system.d.ts +40 -0
  215. package/dist/kernel-system.js +97 -0
  216. package/dist/kernel-system.js.map +1 -0
  217. package/dist/kernel-warn.d.ts +35 -0
  218. package/dist/kernel-warn.js +73 -0
  219. package/dist/kernel-warn.js.map +1 -0
  220. package/dist/key-error.d.ts +44 -0
  221. package/dist/key-error.js +59 -0
  222. package/dist/key-error.js.map +1 -0
  223. package/dist/keyword-splat.d.ts +41 -0
  224. package/dist/keyword-splat.js +65 -0
  225. package/dist/keyword-splat.js.map +1 -0
  226. package/dist/load-error.d.ts +19 -0
  227. package/dist/load-error.js +19 -0
  228. package/dist/load-error.js.map +1 -0
  229. package/dist/load.d.ts +121 -0
  230. package/dist/load.js +263 -0
  231. package/dist/load.js.map +1 -0
  232. package/dist/loaded-features.d.ts +13 -0
  233. package/dist/loaded-features.js +15 -0
  234. package/dist/loaded-features.js.map +1 -0
  235. package/dist/local-jump-error.d.ts +12 -0
  236. package/dist/local-jump-error.js +12 -0
  237. package/dist/local-jump-error.js.map +1 -0
  238. package/dist/logger/formatter.d.ts +21 -0
  239. package/dist/logger/formatter.js +43 -0
  240. package/dist/logger/formatter.js.map +1 -0
  241. package/dist/logger/log-device.d.ts +52 -0
  242. package/dist/logger/log-device.js +104 -0
  243. package/dist/logger/log-device.js.map +1 -0
  244. package/dist/logger/severity.d.ts +23 -0
  245. package/dist/logger/severity.js +42 -0
  246. package/dist/logger/severity.js.map +1 -0
  247. package/dist/logger.d.ts +127 -0
  248. package/dist/logger.js +215 -0
  249. package/dist/logger.js.map +1 -0
  250. package/dist/marshal.d.ts +83 -0
  251. package/dist/marshal.js +1487 -0
  252. package/dist/marshal.js.map +1 -0
  253. package/dist/match-data.d.ts +161 -0
  254. package/dist/match-data.js +284 -0
  255. package/dist/match-data.js.map +1 -0
  256. package/dist/method-cache.d.ts +17 -0
  257. package/dist/method-cache.js +19 -0
  258. package/dist/method-cache.js.map +1 -0
  259. package/dist/method-missing-proxy.d.ts +53 -0
  260. package/dist/method-missing-proxy.js +154 -0
  261. package/dist/method-missing-proxy.js.map +1 -0
  262. package/dist/method.d.ts +132 -0
  263. package/dist/method.js +320 -0
  264. package/dist/method.js.map +1 -0
  265. package/dist/monitor.d.ts +114 -0
  266. package/dist/monitor.js +270 -0
  267. package/dist/monitor.js.map +1 -0
  268. package/dist/mutex.d.ts +51 -0
  269. package/dist/mutex.js +150 -0
  270. package/dist/mutex.js.map +1 -0
  271. package/dist/name-error.d.ts +45 -0
  272. package/dist/name-error.js +54 -0
  273. package/dist/name-error.js.map +1 -0
  274. package/dist/net/http/exceptions.d.ts +31 -0
  275. package/dist/net/http/exceptions.js +46 -0
  276. package/dist/net/http/exceptions.js.map +1 -0
  277. package/dist/net/http/request.d.ts +137 -0
  278. package/dist/net/http/request.js +559 -0
  279. package/dist/net/http/request.js.map +1 -0
  280. package/dist/net/http/requests.d.ts +197 -0
  281. package/dist/net/http/requests.js +197 -0
  282. package/dist/net/http/requests.js.map +1 -0
  283. package/dist/net/http/response.d.ts +141 -0
  284. package/dist/net/http/response.js +416 -0
  285. package/dist/net/http/response.js.map +1 -0
  286. package/dist/net/http/responses.d.ts +345 -0
  287. package/dist/net/http/responses.js +486 -0
  288. package/dist/net/http/responses.js.map +1 -0
  289. package/dist/net/http.d.ts +278 -0
  290. package/dist/net/http.js +760 -0
  291. package/dist/net/http.js.map +1 -0
  292. package/dist/net/protocol.d.ts +227 -0
  293. package/dist/net/protocol.js +392 -0
  294. package/dist/net/protocol.js.map +1 -0
  295. package/dist/nil-class.d.ts +10 -0
  296. package/dist/nil-class.js +27 -0
  297. package/dist/nil-class.js.map +1 -0
  298. package/dist/no-method-error.d.ts +38 -0
  299. package/dist/no-method-error.js +45 -0
  300. package/dist/no-method-error.js.map +1 -0
  301. package/dist/not-implemented-error.d.ts +13 -0
  302. package/dist/not-implemented-error.js +14 -0
  303. package/dist/not-implemented-error.js.map +1 -0
  304. package/dist/numeric.d.ts +211 -0
  305. package/dist/numeric.js +802 -0
  306. package/dist/numeric.js.map +1 -0
  307. package/dist/object-space.d.ts +34 -0
  308. package/dist/object-space.js +152 -0
  309. package/dist/object-space.js.map +1 -0
  310. package/dist/object.d.ts +908 -0
  311. package/dist/object.js +2238 -0
  312. package/dist/object.js.map +1 -0
  313. package/dist/open-uri.d.ts +180 -0
  314. package/dist/open-uri.js +402 -0
  315. package/dist/open-uri.js.map +1 -0
  316. package/dist/open3.d.ts +69 -0
  317. package/dist/open3.js +134 -0
  318. package/dist/open3.js.map +1 -0
  319. package/dist/openssl.d.ts +479 -0
  320. package/dist/openssl.js +1052 -0
  321. package/dist/openssl.js.map +1 -0
  322. package/dist/optparse.d.ts +130 -0
  323. package/dist/optparse.js +457 -0
  324. package/dist/optparse.js.map +1 -0
  325. package/dist/os-adapter.d.ts +20 -0
  326. package/dist/os-adapter.js +95 -0
  327. package/dist/os-adapter.js.map +1 -0
  328. package/dist/pathname.d.ts +71 -0
  329. package/dist/pathname.js +394 -0
  330. package/dist/pathname.js.map +1 -0
  331. package/dist/pp.d.ts +60 -0
  332. package/dist/pp.js +195 -0
  333. package/dist/pp.js.map +1 -0
  334. package/dist/pretty-print.d.ts +89 -0
  335. package/dist/pretty-print.js +232 -0
  336. package/dist/pretty-print.js.map +1 -0
  337. package/dist/process-adapter.d.ts +224 -0
  338. package/dist/process-adapter.js +878 -0
  339. package/dist/process-adapter.js.map +1 -0
  340. package/dist/process.d.ts +192 -0
  341. package/dist/process.js +403 -0
  342. package/dist/process.js.map +1 -0
  343. package/dist/psych/class-loader.d.ts +92 -0
  344. package/dist/psych/class-loader.js +139 -0
  345. package/dist/psych/class-loader.js.map +1 -0
  346. package/dist/psych/coder.d.ts +144 -0
  347. package/dist/psych/coder.js +176 -0
  348. package/dist/psych/coder.js.map +1 -0
  349. package/dist/psych/core-ext.d.ts +8 -0
  350. package/dist/psych/core-ext.js +10 -0
  351. package/dist/psych/core-ext.js.map +1 -0
  352. package/dist/psych/emitter.d.ts +116 -0
  353. package/dist/psych/emitter.js +1130 -0
  354. package/dist/psych/emitter.js.map +1 -0
  355. package/dist/psych/exception.d.ts +43 -0
  356. package/dist/psych/exception.js +54 -0
  357. package/dist/psych/exception.js.map +1 -0
  358. package/dist/psych/handler.d.ts +59 -0
  359. package/dist/psych/handler.js +95 -0
  360. package/dist/psych/handler.js.map +1 -0
  361. package/dist/psych/handlers/document-stream.d.ts +17 -0
  362. package/dist/psych/handlers/document-stream.js +26 -0
  363. package/dist/psych/handlers/document-stream.js.map +1 -0
  364. package/dist/psych/nodes/alias.d.ts +15 -0
  365. package/dist/psych/nodes/alias.js +22 -0
  366. package/dist/psych/nodes/alias.js.map +1 -0
  367. package/dist/psych/nodes/document.d.ts +23 -0
  368. package/dist/psych/nodes/document.js +35 -0
  369. package/dist/psych/nodes/document.js.map +1 -0
  370. package/dist/psych/nodes/mapping.d.ts +25 -0
  371. package/dist/psych/nodes/mapping.js +35 -0
  372. package/dist/psych/nodes/mapping.js.map +1 -0
  373. package/dist/psych/nodes/node.d.ts +59 -0
  374. package/dist/psych/nodes/node.js +79 -0
  375. package/dist/psych/nodes/node.js.map +1 -0
  376. package/dist/psych/nodes/scalar.d.ts +35 -0
  377. package/dist/psych/nodes/scalar.js +47 -0
  378. package/dist/psych/nodes/scalar.js.map +1 -0
  379. package/dist/psych/nodes/sequence.d.ts +25 -0
  380. package/dist/psych/nodes/sequence.js +35 -0
  381. package/dist/psych/nodes/sequence.js.map +1 -0
  382. package/dist/psych/nodes/stream.d.ts +23 -0
  383. package/dist/psych/nodes/stream.js +31 -0
  384. package/dist/psych/nodes/stream.js.map +1 -0
  385. package/dist/psych/omap.d.ts +9 -0
  386. package/dist/psych/omap.js +9 -0
  387. package/dist/psych/omap.js.map +1 -0
  388. package/dist/psych/parser.d.ts +41 -0
  389. package/dist/psych/parser.js +139 -0
  390. package/dist/psych/parser.js.map +1 -0
  391. package/dist/psych/scalar-scanner.d.ts +35 -0
  392. package/dist/psych/scalar-scanner.js +173 -0
  393. package/dist/psych/scalar-scanner.js.map +1 -0
  394. package/dist/psych/syntax-error.d.ts +23 -0
  395. package/dist/psych/syntax-error.js +35 -0
  396. package/dist/psych/syntax-error.js.map +1 -0
  397. package/dist/psych/tree-builder.d.ts +51 -0
  398. package/dist/psych/tree-builder.js +118 -0
  399. package/dist/psych/tree-builder.js.map +1 -0
  400. package/dist/psych/visitors/depth-first.d.ts +27 -0
  401. package/dist/psych/visitors/depth-first.js +37 -0
  402. package/dist/psych/visitors/depth-first.js.map +1 -0
  403. package/dist/psych/visitors/emitter.d.ts +32 -0
  404. package/dist/psych/visitors/emitter.js +63 -0
  405. package/dist/psych/visitors/emitter.js.map +1 -0
  406. package/dist/psych/visitors/to-ruby.d.ts +110 -0
  407. package/dist/psych/visitors/to-ruby.js +396 -0
  408. package/dist/psych/visitors/to-ruby.js.map +1 -0
  409. package/dist/psych/visitors/visitor.d.ts +11 -0
  410. package/dist/psych/visitors/visitor.js +17 -0
  411. package/dist/psych/visitors/visitor.js.map +1 -0
  412. package/dist/psych/visitors/yaml-tree.d.ts +182 -0
  413. package/dist/psych/visitors/yaml-tree.js +593 -0
  414. package/dist/psych/visitors/yaml-tree.js.map +1 -0
  415. package/dist/psych-adapter.d.ts +65 -0
  416. package/dist/psych-adapter.js +121 -0
  417. package/dist/psych-adapter.js.map +1 -0
  418. package/dist/psych-yaml.d.ts +2 -0
  419. package/dist/psych-yaml.js +5 -0
  420. package/dist/psych-yaml.js.map +1 -0
  421. package/dist/psych.d.ts +257 -0
  422. package/dist/psych.js +332 -0
  423. package/dist/psych.js.map +1 -0
  424. package/dist/queue.d.ts +129 -0
  425. package/dist/queue.js +215 -0
  426. package/dist/queue.js.map +1 -0
  427. package/dist/racc/parser.d.ts +70 -0
  428. package/dist/racc/parser.js +206 -0
  429. package/dist/racc/parser.js.map +1 -0
  430. package/dist/range-error.d.ts +15 -0
  431. package/dist/range-error.js +15 -0
  432. package/dist/range-error.js.map +1 -0
  433. package/dist/range.d.ts +166 -0
  434. package/dist/range.js +421 -0
  435. package/dist/range.js.map +1 -0
  436. package/dist/rational.d.ts +167 -0
  437. package/dist/rational.js +379 -0
  438. package/dist/rational.js.map +1 -0
  439. package/dist/rb-config.d.ts +33 -0
  440. package/dist/rb-config.js +53 -0
  441. package/dist/rb-config.js.map +1 -0
  442. package/dist/rb-equal.d.ts +66 -0
  443. package/dist/rb-equal.js +261 -0
  444. package/dist/rb-equal.js.map +1 -0
  445. package/dist/rb-hash.d.ts +26 -0
  446. package/dist/rb-hash.js +108 -0
  447. package/dist/rb-hash.js.map +1 -0
  448. package/dist/regexp.d.ts +82 -0
  449. package/dist/regexp.js +191 -0
  450. package/dist/regexp.js.map +1 -0
  451. package/dist/repl-adapter.d.ts +188 -0
  452. package/dist/repl-adapter.js +388 -0
  453. package/dist/repl-adapter.js.map +1 -0
  454. package/dist/resolv.d.ts +30 -0
  455. package/dist/resolv.js +48 -0
  456. package/dist/resolv.js.map +1 -0
  457. package/dist/ruby-empty.d.ts +28 -0
  458. package/dist/ruby-empty.js +40 -0
  459. package/dist/ruby-empty.js.map +1 -0
  460. package/dist/ruby-platform.d.ts +39 -0
  461. package/dist/ruby-platform.js +49 -0
  462. package/dist/ruby-platform.js.map +1 -0
  463. package/dist/runtime-error.d.ts +15 -0
  464. package/dist/runtime-error.js +16 -0
  465. package/dist/runtime-error.js.map +1 -0
  466. package/dist/scheduled-task.d.ts +73 -0
  467. package/dist/scheduled-task.js +150 -0
  468. package/dist/scheduled-task.js.map +1 -0
  469. package/dist/secure-random.d.ts +33 -0
  470. package/dist/secure-random.js +78 -0
  471. package/dist/secure-random.js.map +1 -0
  472. package/dist/set.d.ts +158 -0
  473. package/dist/set.js +352 -0
  474. package/dist/set.js.map +1 -0
  475. package/dist/shellwords.d.ts +27 -0
  476. package/dist/shellwords.js +53 -0
  477. package/dist/shellwords.js.map +1 -0
  478. package/dist/signal-exception.d.ts +21 -0
  479. package/dist/signal-exception.js +21 -0
  480. package/dist/signal-exception.js.map +1 -0
  481. package/dist/socket.d.ts +230 -0
  482. package/dist/socket.js +484 -0
  483. package/dist/socket.js.map +1 -0
  484. package/dist/standard-error.d.ts +18 -0
  485. package/dist/standard-error.js +23 -0
  486. package/dist/standard-error.js.map +1 -0
  487. package/dist/stop-iteration.d.ts +10 -0
  488. package/dist/stop-iteration.js +10 -0
  489. package/dist/stop-iteration.js.map +1 -0
  490. package/dist/string/b.d.ts +19 -0
  491. package/dist/string/b.js +28 -0
  492. package/dist/string/b.js.map +1 -0
  493. package/dist/string/byte-methods.d.ts +57 -0
  494. package/dist/string/byte-methods.js +266 -0
  495. package/dist/string/byte-methods.js.map +1 -0
  496. package/dist/string/bytes.d.ts +35 -0
  497. package/dist/string/bytes.js +123 -0
  498. package/dist/string/bytes.js.map +1 -0
  499. package/dist/string/case-mapping.d.ts +57 -0
  500. package/dist/string/case-mapping.js +192 -0
  501. package/dist/string/case-mapping.js.map +1 -0
  502. package/dist/string/chomp.d.ts +15 -0
  503. package/dist/string/chomp.js +32 -0
  504. package/dist/string/chomp.js.map +1 -0
  505. package/dist/string/convert.d.ts +55 -0
  506. package/dist/string/convert.js +316 -0
  507. package/dist/string/convert.js.map +1 -0
  508. package/dist/string/delete.d.ts +14 -0
  509. package/dist/string/delete.js +17 -0
  510. package/dist/string/delete.js.map +1 -0
  511. package/dist/string/each.d.ts +108 -0
  512. package/dist/string/each.js +305 -0
  513. package/dist/string/each.js.map +1 -0
  514. package/dist/string/encode.d.ts +37 -0
  515. package/dist/string/encode.js +268 -0
  516. package/dist/string/encode.js.map +1 -0
  517. package/dist/string/force-encoding.d.ts +72 -0
  518. package/dist/string/force-encoding.js +147 -0
  519. package/dist/string/force-encoding.js.map +1 -0
  520. package/dist/string/inspect.d.ts +17 -0
  521. package/dist/string/inspect.js +81 -0
  522. package/dist/string/inspect.js.map +1 -0
  523. package/dist/string/method-table.d.ts +174 -0
  524. package/dist/string/method-table.js +805 -0
  525. package/dist/string/method-table.js.map +1 -0
  526. package/dist/string/scrub.d.ts +12 -0
  527. package/dist/string/scrub.js +33 -0
  528. package/dist/string/scrub.js.map +1 -0
  529. package/dist/string/slice.d.ts +26 -0
  530. package/dist/string/slice.js +73 -0
  531. package/dist/string/slice.js.map +1 -0
  532. package/dist/string/split.d.ts +11 -0
  533. package/dist/string/split.js +44 -0
  534. package/dist/string/split.js.map +1 -0
  535. package/dist/string/sub.d.ts +114 -0
  536. package/dist/string/sub.js +371 -0
  537. package/dist/string/sub.js.map +1 -0
  538. package/dist/string/succ.d.ts +14 -0
  539. package/dist/string/succ.js +118 -0
  540. package/dist/string/succ.js.map +1 -0
  541. package/dist/string/support.d.ts +135 -0
  542. package/dist/string/support.js +283 -0
  543. package/dist/string/support.js.map +1 -0
  544. package/dist/string/tr.d.ts +46 -0
  545. package/dist/string/tr.js +156 -0
  546. package/dist/string/tr.js.map +1 -0
  547. package/dist/string-io.d.ts +166 -0
  548. package/dist/string-io.js +248 -0
  549. package/dist/string-io.js.map +1 -0
  550. package/dist/string-scanner.d.ts +133 -0
  551. package/dist/string-scanner.js +248 -0
  552. package/dist/string-scanner.js.map +1 -0
  553. package/dist/struct.d.ts +54 -0
  554. package/dist/struct.js +222 -0
  555. package/dist/struct.js.map +1 -0
  556. package/dist/symbol.d.ts +48 -0
  557. package/dist/symbol.js +107 -0
  558. package/dist/symbol.js.map +1 -0
  559. package/dist/tempfile.d.ts +173 -0
  560. package/dist/tempfile.js +290 -0
  561. package/dist/tempfile.js.map +1 -0
  562. package/dist/temporal-tag.d.ts +23 -0
  563. package/dist/temporal-tag.js +29 -0
  564. package/dist/temporal-tag.js.map +1 -0
  565. package/dist/thread-error.d.ts +13 -0
  566. package/dist/thread-error.js +13 -0
  567. package/dist/thread-error.js.map +1 -0
  568. package/dist/thread-pool-executor.d.ts +119 -0
  569. package/dist/thread-pool-executor.js +250 -0
  570. package/dist/thread-pool-executor.js.map +1 -0
  571. package/dist/thread.d.ts +211 -0
  572. package/dist/thread.js +495 -0
  573. package/dist/thread.js.map +1 -0
  574. package/dist/timeout.d.ts +29 -0
  575. package/dist/timeout.js +41 -0
  576. package/dist/timeout.js.map +1 -0
  577. package/dist/tse.d.ts +40 -0
  578. package/dist/tse.js +62 -0
  579. package/dist/tse.js.map +1 -0
  580. package/dist/type-error.d.ts +14 -0
  581. package/dist/type-error.js +15 -0
  582. package/dist/type-error.js.map +1 -0
  583. package/dist/undefined-conversion-error.d.ts +10 -0
  584. package/dist/undefined-conversion-error.js +10 -0
  585. package/dist/undefined-conversion-error.js.map +1 -0
  586. package/dist/uri/common.d.ts +209 -0
  587. package/dist/uri/common.js +369 -0
  588. package/dist/uri/common.js.map +1 -0
  589. package/dist/uri/generic.d.ts +283 -0
  590. package/dist/uri/generic.js +810 -0
  591. package/dist/uri/generic.js.map +1 -0
  592. package/dist/uri/http.d.ts +23 -0
  593. package/dist/uri/http.js +30 -0
  594. package/dist/uri/http.js.map +1 -0
  595. package/dist/uri/https.d.ts +13 -0
  596. package/dist/uri/https.js +15 -0
  597. package/dist/uri/https.js.map +1 -0
  598. package/dist/uri/rfc2396-parser.d.ts +70 -0
  599. package/dist/uri/rfc2396-parser.js +264 -0
  600. package/dist/uri/rfc2396-parser.js.map +1 -0
  601. package/dist/uri/rfc3986-parser.d.ts +46 -0
  602. package/dist/uri/rfc3986-parser.js +171 -0
  603. package/dist/uri/rfc3986-parser.js.map +1 -0
  604. package/dist/uri.d.ts +13 -0
  605. package/dist/uri.js +13 -0
  606. package/dist/uri.js.map +1 -0
  607. package/dist/variable.d.ts +183 -0
  608. package/dist/variable.js +463 -0
  609. package/dist/variable.js.map +1 -0
  610. package/dist/verbose.d.ts +21 -0
  611. package/dist/verbose.js +26 -0
  612. package/dist/verbose.js.map +1 -0
  613. package/dist/yaml.d.ts +9 -0
  614. package/dist/yaml.js +9 -0
  615. package/dist/yaml.js.map +1 -0
  616. package/dist/zlib-adapter.d.ts +117 -0
  617. package/dist/zlib-adapter.js +250 -0
  618. package/dist/zlib-adapter.js.map +1 -0
  619. package/dist/zlib.d.ts +248 -0
  620. package/dist/zlib.js +362 -0
  621. package/dist/zlib.js.map +1 -0
  622. package/package.json +82 -3
package/dist/file.d.ts ADDED
@@ -0,0 +1,635 @@
1
+ import { Encoding } from "./encoding.js";
2
+ import type { FsStatResult } from "./fs-adapter.js";
3
+ import { IO } from "./io.js";
4
+ /** @noRailsEquivalent PERMANENT */
5
+ export type PathLike = {
6
+ toPath(): string;
7
+ };
8
+ /**
9
+ * `rb_get_path` (`vendor/ruby/v3.3.11/file.c:246`), the `FilePathValue` conversion:
10
+ * a String is the path, anything else is asked for `to_path`, and the answer (the
11
+ * object itself where it has no `to_path`) goes through `StringValue`
12
+ * (`rb_get_path_check_to_string`, `file.c:212-224`).
13
+ *
14
+ * @noRailsEquivalent PERMANENT — `vendor/ruby/v3.3.11/file.c:246`
15
+ */
16
+ export declare function rbGetPath(obj: unknown): string;
17
+ type FileJoinArg = string | PathLike | readonly FileJoinArg[];
18
+ /**
19
+ * The keyword hash `rb_scan_open_args` scans off `File.open`'s arguments
20
+ * (`vendor/ruby/v3.3.11/io.c:8088`), as far as `rb_io_extract_modeenc` reads
21
+ * it: `mode:` (`io.c:6923`), `binmode:` (`io.c:6834`), `perm:` and
22
+ * `external_encoding:`.
23
+ */
24
+ export interface FileOpenOpt {
25
+ mode?: string;
26
+ binmode?: boolean;
27
+ perm?: number;
28
+ externalEncoding?: Encoding | string;
29
+ }
30
+ /**
31
+ * `File` (`vendor/ruby/v3.3.11/file.c:7354` `rb_cFile`), the sliver of it trails calls.
32
+ *
33
+ * Rails reaches the filesystem through this class — `File.exist?(key)` in
34
+ * `vendor/rails/v8.0.5.2/activesupport/lib/active_support/cache/file_store.rb:125`,
35
+ * `File.join(cache_path, ...)` at `file_store.rb:185`,
36
+ * `File.realpath(dir)` at `file_store.rb:196` — so trails reaches it through a
37
+ * class of the same name rather than through members named after node's `fs`.
38
+ * The backend a member lands on is the `FsAdapter` contract in
39
+ * `./fs-adapter.js`; a platform registers one, and nothing here names a
40
+ * runtime.
41
+ *
42
+ * Only the members ported bodies call are here. `File::SEPARATOR` is `"/"` on
43
+ * every platform (`vendor/ruby/v3.3.11/file.c:7427`); the backslash is
44
+ * `File::ALT_SEPARATOR`, which is `nil` off DOSISH (`file.c:7435`).
45
+ *
46
+ * @noRailsEquivalent PERMANENT — Ruby core `File` (`vendor/ruby/v3.3.11/file.c:7354`),
47
+ * which Rails calls without defining, so no Rails or gem file declares the
48
+ * class this file's single export lives in.
49
+ */
50
+ export declare class File extends IO {
51
+ /**
52
+ * `rb_file_initialize` (`vendor/ruby/v3.3.11/io.c:9616`) over `rb_open_file`
53
+ * (`io.c:8102`): `File.new(filename, mode = "r", opt)` opens the named file.
54
+ * Ruby's mode string carries the binary flag node's `flags` has no letter
55
+ * for, so `b` is dropped from the flags and recorded on the stream instead
56
+ * (`rb_io_binmode`, `io.c:6311`), and everything after the first `:` is
57
+ * `parse_mode_enc`'s encoding (`io.c:6667,6883-6886`).
58
+ *
59
+ * @noRailsEquivalent PERMANENT — Ruby core `File.new`
60
+ * (`vendor/ruby/v3.3.11/io.c:9616`).
61
+ *
62
+ * An Integer `fileName` is `rb_file_initialize`'s fd arm, `rb_io_initialize`
63
+ * over a descriptor already open, which has no path.
64
+ */
65
+ constructor(fileName: string | number, mode?: string | FileOpenOpt, opt?: FileOpenOpt);
66
+ /**
67
+ * `vendor/ruby/v3.3.11/file.c:7427` — `File::SEPARATOR`, `"/"` on every platform.
68
+ *
69
+ * @noRailsEquivalent PERMANENT — Ruby core `File::SEPARATOR`.
70
+ */
71
+ static readonly SEPARATOR = "/";
72
+ /**
73
+ * `vendor/ruby/v3.3.11/file.c:7433` — `File::ALT_SEPARATOR`, the `'\\'` of
74
+ * `FILE_ALT_SEPARATOR` (`file.c:3303`) where the build is DOSISH, and `nil`
75
+ * everywhere else (`file.c:7435`). The platform answer comes from the
76
+ * registered path backend's separator rather than from a runtime global.
77
+ *
78
+ * @noRailsEquivalent PERMANENT — Ruby core `File::ALT_SEPARATOR`.
79
+ */
80
+ static get ALT_SEPARATOR(): string | null;
81
+ /**
82
+ * `vendor/ruby/v3.3.11/file.c:7440` — `File::PATH_SEPARATOR`, the `';'` of a DOSISH
83
+ * build and `':'` everywhere else. The platform answer comes from the
84
+ * registered path backend's separator, as `ALT_SEPARATOR` above does.
85
+ *
86
+ * @noRailsEquivalent PERMANENT — Ruby core `File::PATH_SEPARATOR`.
87
+ */
88
+ static get PATH_SEPARATOR(): string;
89
+ /**
90
+ * `vendor/ruby/v3.3.11/file.c:7841` — `File::LOCK_EX`, the exclusive-lock operation
91
+ * `File#flock` takes (`file.c:5198`).
92
+ *
93
+ * @noRailsEquivalent PERMANENT — Ruby core `File::LOCK_EX`.
94
+ */
95
+ static readonly LOCK_EX = 2;
96
+ /**
97
+ * `vendor/ruby/v3.3.11/file.c:7843` — `File::LOCK_UN`, the release operation
98
+ * `File#flock` takes (`file.c:5204`).
99
+ *
100
+ * @noRailsEquivalent PERMANENT — Ruby core `File::LOCK_UN`.
101
+ */
102
+ static readonly LOCK_UN = 8;
103
+ /**
104
+ * `vendor/ruby/v3.3.11/file.c:7845` — `File::LOCK_NB`, which makes `File#flock`
105
+ * answer `false` rather than wait (`file.c:5201`).
106
+ *
107
+ * @noRailsEquivalent PERMANENT — Ruby core `File::LOCK_NB`.
108
+ */
109
+ static readonly LOCK_NB = 4;
110
+ /**
111
+ * `vendor/ruby/v3.3.11/dir.c:3678` — a backslash is an ordinary character, not an escape.
112
+ *
113
+ * @noRailsEquivalent PERMANENT — Ruby core `File::FNM_NOESCAPE`.
114
+ */
115
+ static readonly FNM_NOESCAPE = 1;
116
+ /**
117
+ * `vendor/ruby/v3.3.11/dir.c:3682` — `*`, `?` and a bracket stop at `/`, and `**` + `/` walks elements.
118
+ *
119
+ * @noRailsEquivalent PERMANENT — Ruby core `File::FNM_PATHNAME`.
120
+ */
121
+ static readonly FNM_PATHNAME = 2;
122
+ /**
123
+ * `vendor/ruby/v3.3.11/dir.c:3686` — a wildcard may match a leading period.
124
+ *
125
+ * @noRailsEquivalent PERMANENT — Ruby core `File::FNM_DOTMATCH`.
126
+ */
127
+ static readonly FNM_DOTMATCH = 4;
128
+ /**
129
+ * `vendor/ruby/v3.3.11/dir.c:3674` — case-insensitive matching.
130
+ *
131
+ * @noRailsEquivalent PERMANENT — Ruby core `File::FNM_CASEFOLD`.
132
+ */
133
+ static readonly FNM_CASEFOLD = 8;
134
+ /**
135
+ * `vendor/ruby/v3.3.11/dir.c:222-226` — `FNM_CASEFOLD` on a case-folding filesystem
136
+ * and `0` otherwise, which is the arm `Entry_#descendant_directory?` selects
137
+ * on (`vendor/ruby/v3.3.11/lib/fileutils.rb:2453`).
138
+ *
139
+ * @noRailsEquivalent PERMANENT — Ruby core `File::FNM_SYSCASE`.
140
+ */
141
+ static readonly FNM_SYSCASE = 0;
142
+ /**
143
+ * `vendor/ruby/v3.3.11/dir.c:3690` — `{a,b}` alternation, expanded by `ruby_brace_expand` (`dir.c:3471-3478`).
144
+ *
145
+ * @noRailsEquivalent PERMANENT — Ruby core `File::FNM_EXTGLOB`.
146
+ */
147
+ static readonly FNM_EXTGLOB = 16;
148
+ /**
149
+ * `vendor/ruby/v3.3.11/file.c:1806` `rb_file_exist_p`, which is `rb_stat(fname)`
150
+ * against a FOLLOWED symlink — so a broken symlink is `false` even though
151
+ * `File.symlink?` is `true`.
152
+ *
153
+ * @noRailsEquivalent PERMANENT — Ruby core `File.exist?`
154
+ * (`vendor/ruby/v3.3.11/file.c:1806`).
155
+ */
156
+ static isExist(fileName: string | PathLike): boolean;
157
+ /**
158
+ * {@link File.isExist} over the backend's async `exists`.
159
+ *
160
+ * @noRailsEquivalent PERMANENT — Ruby core `File.exist?`
161
+ * (`vendor/ruby/v3.3.11/file.c:1806`).
162
+ */
163
+ static isExistAsync(fileName: string): Promise<boolean>;
164
+ /**
165
+ * `vendor/ruby/v3.3.11/file.c:2196` `rb_file_identical_p` — `false` unless both
166
+ * names stat successfully and report the same `st_dev` and `st_ino`
167
+ * (`file.c:2201-2205`). Either argument may be an open stream, which
168
+ * `rb_stat` (`file.c:1296`) `fstat`s instead. An adapter that reports no
169
+ * device identity cannot answer, so it answers `false`.
170
+ *
171
+ * @noRailsEquivalent PERMANENT — Ruby core `File.identical?`
172
+ * (`vendor/ruby/v3.3.11/file.c:2196`).
173
+ */
174
+ static isIdentical(fileName1: IO | string, fileName2: IO | string): boolean;
175
+ /**
176
+ * {@link File.isDirectory} over the backend's async `stat`: any failed stat
177
+ * answers `false`, as `rb_file_directory_p` does (`file.c:1622`).
178
+ *
179
+ * @noRailsEquivalent PERMANENT — Ruby core `File.directory?`
180
+ * (`vendor/ruby/v3.3.11/file.c:1615`).
181
+ */
182
+ static isDirectoryAsync(fileName: string): Promise<boolean>;
183
+ /**
184
+ * `vendor/ruby/v3.3.11/file.c:1615` `rb_file_directory_p`, which answers `false`
185
+ * rather than raising when the stat fails (`file.c:1622`).
186
+ *
187
+ * @noRailsEquivalent PERMANENT — Ruby core `File.directory?`
188
+ * (`vendor/ruby/v3.3.11/file.c:1615`).
189
+ */
190
+ static isDirectory(fileName: string): boolean;
191
+ /**
192
+ * `vendor/ruby/v3.3.11/file.c:1966` `rb_file_executable_p`, which is
193
+ * `rb_eaccess(fname, X_OK) >= 0`: the backend's `File::Stat#executable?`
194
+ * (`file.c:2244`), and `false` where the stat fails.
195
+ *
196
+ * @noRailsEquivalent PERMANENT — Ruby core `File.executable?`
197
+ * (`vendor/ruby/v3.3.11/file.c:1966`).
198
+ */
199
+ static isExecutable(fileName: string): boolean;
200
+ /**
201
+ * `vendor/ruby/v3.3.11/file.c:1723` `rb_file_symlink_p`, which `lstat`s the name and
202
+ * answers `false` rather than raising when the `lstat` fails
203
+ * (`file.c:1730`), the way its {@link File.isDirectory} neighbour does.
204
+ *
205
+ * @noRailsEquivalent PERMANENT — Ruby core `File.symlink?`
206
+ * (`vendor/ruby/v3.3.11/file.c:1723`).
207
+ */
208
+ static isSymlink(fileName: string): boolean;
209
+ /**
210
+ * @noRailsEquivalent PERMANENT — Ruby core `File.file?`
211
+ * (`vendor/ruby/v3.3.11/file.c:2009`), over the backend's async `stat`.
212
+ */
213
+ static isFileAsync(fileName: string): Promise<boolean>;
214
+ /**
215
+ * {@link File.isIdentical} over the backend's async `stat`, which is the
216
+ * form a caller on the async fs path awaits; a backend with no async `stat`
217
+ * is read through its sync one. A stream argument is still `fstat`ed, as
218
+ * `rb_stat` (`vendor/ruby/v3.3.11/file.c:1296`) does.
219
+ *
220
+ * @noRailsEquivalent PERMANENT — Ruby core `File.identical?`
221
+ * (`vendor/ruby/v3.3.11/file.c:2196`).
222
+ */
223
+ static isIdenticalAsync(fileName1: IO | string, fileName2: IO | string): Promise<boolean>;
224
+ /**
225
+ * {@link File.isSymlink} over the backend's async `lstat`, `false` on a
226
+ * failed `lstat`; a backend with no async `lstat` is read through its sync
227
+ * one.
228
+ *
229
+ * @noRailsEquivalent PERMANENT — Ruby core `File.symlink?`
230
+ * (`vendor/ruby/v3.3.11/file.c:1670`).
231
+ */
232
+ static isSymlinkAsync(fileName: string): Promise<boolean>;
233
+ /**
234
+ * `vendor/ruby/v3.3.11/file.c:2009` `rb_file_file_p`, `false` on a failed stat.
235
+ *
236
+ * @noRailsEquivalent PERMANENT — Ruby core `File.file?`
237
+ * (`vendor/ruby/v3.3.11/file.c:2009`).
238
+ */
239
+ static isFile(fileName: string): boolean;
240
+ /**
241
+ * {@link File.isReadable} over the backend's async `access`, `rb_eaccess(fname, R_OK)`.
242
+ *
243
+ * @noRailsEquivalent PERMANENT — Ruby core `File.readable?`
244
+ * (`vendor/ruby/v3.3.11/file.c:1826`).
245
+ */
246
+ static isReadableAsync(fileName: string): Promise<boolean>;
247
+ /**
248
+ * {@link File.isExecutable} over the backend's async `access`, `rb_eaccess(fname, X_OK)`.
249
+ *
250
+ * @noRailsEquivalent PERMANENT — Ruby core `File.executable?`
251
+ * (`vendor/ruby/v3.3.11/file.c:1966`).
252
+ */
253
+ static isExecutableAsync(fileName: string): Promise<boolean>;
254
+ /**
255
+ * `vendor/ruby/v3.3.11/file.c:1826` `rb_file_readable_p`, which is
256
+ * `rb_eaccess(fname, R_OK) >= 0` and so is `false` both for a file that is
257
+ * not there and for one the effective user cannot read. `R_OK` is POSIX's
258
+ * `4` rather than a Ruby constant. A backend with no access check has no
259
+ * `accessSync`, and there existence is all that can be answered.
260
+ *
261
+ * @noRailsEquivalent PERMANENT — Ruby core `File.readable?`
262
+ * (`vendor/ruby/v3.3.11/file.c:1826`).
263
+ */
264
+ static isReadable(fileName: string): boolean;
265
+ /**
266
+ * `vendor/ruby/v3.3.11/file.c:1329` `rb_file_s_stat`, which RAISES `Errno::ENOENT`
267
+ * rather than answering `nil` when the path is not there — the predicates
268
+ * above are the arms that swallow it.
269
+ *
270
+ * @noRailsEquivalent PERMANENT — Ruby core `File.stat`
271
+ * (`vendor/ruby/v3.3.11/file.c:1329`).
272
+ */
273
+ static stat(fileName: string): FsStatResult;
274
+ /**
275
+ * `vendor/ruby/v3.3.11/file.c:1305` `rb_file_s_size` — the byte size of the named
276
+ * file, which is `File.stat(file_name).size`.
277
+ *
278
+ * @noRailsEquivalent PERMANENT — Ruby core `File.size`
279
+ * (`vendor/ruby/v3.3.11/file.c:1305`).
280
+ */
281
+ static size(fileName: string): number;
282
+ /**
283
+ * `vendor/ruby/v3.3.11/file.c:2047` `rb_file_size_p` — `File.size?`, `nil` both when
284
+ * the file is missing AND when it is empty, which is what makes it a
285
+ * three-state answer rather than a size.
286
+ *
287
+ * @noRailsEquivalent PERMANENT — Ruby core `File.size?`
288
+ * (`vendor/ruby/v3.3.11/file.c:2047`).
289
+ */
290
+ static isSize(fileName: string): number | null;
291
+ /**
292
+ * `vendor/ruby/v3.3.11/io.c:15418`, where `rb_cFile` registers `rb_io_s_open`
293
+ * (`io.c:8148`): with a block the stream is closed once the block returns
294
+ * and the block's value is the answer. Ruby's mode string carries the
295
+ * binary flag node's `flags` has no letter for, so `b` is dropped from the
296
+ * flags and recorded on the stream instead (`rb_io_binmode`, `io.c:6311`),
297
+ * where {@link IO#write} reads it.
298
+ *
299
+ * `rb_io_s_open` takes the `opt` hash Ruby's `File.open(filename, mode, opt)`
300
+ * form passes through to `open(2)`, of which `perm:` is the mode
301
+ * `Tempfile#initialize` sets to `0600` (`vendor/ruby/v3.3.11/lib/tempfile.rb:158`)
302
+ * and `external_encoding:` the stream's external encoding
303
+ * (`rb_io_extract_encoding_option`, `io.c:6725,6750`).
304
+ * `mode` defaults to `"r"` (`rb_open_file`, `vendor/ruby/v3.3.11/io.c:8102`); a caller that
305
+ * skips it passes `undefined`.
306
+ * Ruby's block is a block and its `opt` a trailing argument; TypeScript has
307
+ * only the one trailing position for both, so the third parameter is either,
308
+ * discriminated by `typeof`, and a block that follows an `opt` is the fourth.
309
+ *
310
+ * The mode string carries that encoding too — everything after the first
311
+ * `:` is `parse_mode_enc`'s `"enc"`, `"enc2:enc"` or `"enc:-"`
312
+ * (`io.c:6667,6883-6886`), which {@link IO#setEncoding} parses.
313
+ *
314
+ * `rb_io_s_open` closes the stream through `rb_ensure` once the block has
315
+ * finished. A block that returns a promise has not finished until it
316
+ * settles, so the close waits for it — otherwise an async block would write
317
+ * to a closed stream.
318
+ *
319
+ * @noRailsEquivalent PERMANENT — Ruby core `File.open`
320
+ * (`vendor/ruby/v3.3.11/io.c:8148`).
321
+ */
322
+ static open(fileName: string, mode?: string | FileOpenOpt, opt?: FileOpenOpt): File;
323
+ static open<T>(fileName: string, mode: string | FileOpenOpt | undefined, block: (file: File) => T): T;
324
+ static open<T>(fileName: string, mode: string | FileOpenOpt | undefined, opt: FileOpenOpt, block: (file: File) => T): T;
325
+ /**
326
+ * {@link File.open} over the backend's async open, for a caller whose block
327
+ * reads with {@link IO#eachAsync}. The stream closes once the block settles.
328
+ *
329
+ * @noRailsEquivalent PERMANENT — Ruby core `File.open`
330
+ * (`vendor/ruby/v3.3.11/io.c:8148`).
331
+ */
332
+ static openAsync<F extends File>(this: new (fileName: number, mode?: string | FileOpenOpt, opt?: FileOpenOpt) => F, fileName: string, mode?: string | FileOpenOpt, opt?: FileOpenOpt): Promise<F>;
333
+ static openAsync<T>(fileName: string, mode: string | FileOpenOpt | undefined, block: (file: File) => T | Promise<T>): Promise<T>;
334
+ static openAsync<T>(fileName: string, mode: string | FileOpenOpt | undefined, opt: FileOpenOpt, block: (file: File) => T | Promise<T>): Promise<T>;
335
+ /**
336
+ * `vendor/ruby/v3.3.11/io.c:12200` `rb_io_s_read`, in its whole-file form: its `opt`
337
+ * hash reaches `open_key_args` (`io.c:12163`), which opens the stream with
338
+ * it — so `encoding:` is `rb_io_extract_encoding_option`'s external encoding
339
+ * (`io.c:6725,6750`) and the read tags its String with it (`io_enc_str`,
340
+ * `io.c:3123`), `ASCII-8BIT` being the one that answers the file's bytes.
341
+ * `open_key_args` closes the stream through `rb_ensure` (`io.c:12180`).
342
+ *
343
+ * @noRailsEquivalent PERMANENT — Ruby core `File.read` (`IO.read`,
344
+ * `vendor/ruby/v3.3.11/io.c:12200`).
345
+ */
346
+ static read(name: string): string;
347
+ /** @noRailsEquivalent PERMANENT — Ruby core `File.read` (`vendor/ruby/v3.3.11/io.c:12200`). */
348
+ static read(name: string, opt: {
349
+ encoding?: Encoding | string;
350
+ }): string | Uint8Array;
351
+ /**
352
+ * {@link File.read} over the backend's async `readFile`, as UTF-8 text.
353
+ *
354
+ * @noRailsEquivalent PERMANENT — Ruby core `File.read` (`IO.read`,
355
+ * `vendor/ruby/v3.3.11/io.c:12200`).
356
+ */
357
+ static readAsync(name: string): Promise<string>;
358
+ /**
359
+ * `vendor/ruby/v3.3.11/io.c:12063` `rb_io_s_foreach` in its block form: the stream
360
+ * opens through `open_key_args` (`io.c:12163`), `rb_io_each_line`
361
+ * (`io.c:4159`) yields each line with its separator retained, and
362
+ * `rb_ensure` (`io.c:12180`) closes it. The file is read in chunks, never
363
+ * whole; the decoder streams so a character straddling two chunks survives.
364
+ *
365
+ * @noRailsEquivalent PERMANENT — Ruby core `File.foreach` (`IO.foreach`,
366
+ * `vendor/ruby/v3.3.11/io.c:12063`).
367
+ */
368
+ static foreach(name: string, block: (line: string) => void): null;
369
+ /**
370
+ * `vendor/ruby/v3.3.11/io.c:12377` `rb_io_s_write`, which answers the number of
371
+ * BYTES written rather than the string itself.
372
+ *
373
+ * @noRailsEquivalent PERMANENT — Ruby core `File.write` (`IO.write`,
374
+ * `vendor/ruby/v3.3.11/io.c:12377`).
375
+ */
376
+ static write(name: string, string: string): number;
377
+ /**
378
+ * `vendor/ruby/v3.3.11/file.c:3202` `rb_file_s_unlink`, which answers the number of
379
+ * files deleted and raises on the first failure.
380
+ *
381
+ * @noRailsEquivalent PERMANENT — Ruby core `File.delete`
382
+ * (`vendor/ruby/v3.3.11/file.c:3202`).
383
+ */
384
+ static delete(...files: string[]): number;
385
+ /**
386
+ * {@link File.write} over the backend's async `writeFile`, falling back to its
387
+ * `writeFileSync`. `perm` is `IO.write`'s `perm:` option
388
+ * (`vendor/ruby/v3.3.11/io.c:6953`), the mode a created file is opened with,
389
+ * and `mode` its `mode:` open-mode string (`"wx"` is
390
+ * `CREAT | EXCL | WRONLY`, raising `Errno::EEXIST` on an existing file).
391
+ *
392
+ * @noRailsEquivalent PERMANENT — Ruby core `File.write` (`IO.write`,
393
+ * `vendor/ruby/v3.3.11/io.c:12377`).
394
+ */
395
+ static writeAsync(name: string, string: string | Uint8Array, { perm, mode }?: {
396
+ perm?: number;
397
+ mode?: string;
398
+ }): Promise<number>;
399
+ /**
400
+ * {@link File.delete} over the backend's async `unlink`, falling back to its
401
+ * `unlinkSync`.
402
+ *
403
+ * @noRailsEquivalent PERMANENT — Ruby core `File.delete`
404
+ * (`vendor/ruby/v3.3.11/file.c:3202`).
405
+ */
406
+ static deleteAsync(...files: string[]): Promise<number>;
407
+ /**
408
+ * `vendor/ruby/v3.3.11/file.c:3279` `rb_file_s_umask`, reading only. A backend
409
+ * with no permission bits answers 0, as `chmod` below is a no-op there.
410
+ *
411
+ * @noRailsEquivalent PERMANENT
412
+ */
413
+ static umask(): number;
414
+ /**
415
+ * `vendor/ruby/v3.3.11/file.c:2575` `rb_file_s_chmod`, which answers the number of
416
+ * files whose mode was set. A backend with no permission bits has no
417
+ * `chmodSync`, and there the call is a no-op.
418
+ *
419
+ * @noRailsEquivalent PERMANENT — Ruby core `File.chmod`
420
+ * (`vendor/ruby/v3.3.11/file.c:2575`).
421
+ */
422
+ static chmod(mode: number, ...files: string[]): number;
423
+ /**
424
+ * {@link File.chmod} over the backend's async `chmod`, falling back to its
425
+ * `chmodSync`; a backend with no permission bits has neither, and there the
426
+ * call is a no-op too.
427
+ *
428
+ * @noRailsEquivalent PERMANENT — Ruby core `File.chmod`
429
+ * (`vendor/ruby/v3.3.11/file.c:2575`).
430
+ */
431
+ static chmodAsync(mode: number, ...files: string[]): Promise<number>;
432
+ /**
433
+ * `vendor/ruby/v3.3.11/file.c:3056` `rb_file_s_link`, which answers `0`
434
+ * (`file.c:3066`) and raises `NotImplementedError` on a platform with no
435
+ * `link(2)` — spelled here as a backend with no `link`.
436
+ *
437
+ * @noRailsEquivalent PERMANENT — Ruby core `File.link`
438
+ * (`vendor/ruby/v3.3.11/file.c:3056`).
439
+ */
440
+ static linkAsync(oldName: string, newName: string): Promise<number>;
441
+ /**
442
+ * `vendor/ruby/v3.3.11/file.c:3086` `rb_file_s_symlink`, which answers `0`
443
+ * (`file.c:3096`) and raises `NotImplementedError` on a platform with no
444
+ * `symlink(2)` — spelled here as a backend with no `symlink`.
445
+ *
446
+ * @noRailsEquivalent PERMANENT — Ruby core `File.symlink`
447
+ * (`vendor/ruby/v3.3.11/file.c:3086`).
448
+ */
449
+ static symlinkAsync(oldName: string, newName: string): Promise<number>;
450
+ /**
451
+ * `vendor/ruby/v3.3.11/file.c:3115` `rb_file_s_readlink`: the name of the file
452
+ * the link `path` refers to. `rb_f_notimplement` stands in on a platform with
453
+ * no `readlink(2)` (`file.c:3197`), spelled here as a backend with no
454
+ * `readlinkSync`.
455
+ *
456
+ * @noRailsEquivalent PERMANENT — Ruby core `File.readlink`
457
+ * (`vendor/ruby/v3.3.11/file.c:3115`).
458
+ */
459
+ static readlink(path: string): string;
460
+ /**
461
+ * @noRailsEquivalent PERMANENT — Ruby core `File.chown`
462
+ * (`vendor/ruby/v3.3.11/file.c:2706`), over the backend's async `chown`.
463
+ */
464
+ static chownAsync(owner: number | null, group: number | null, path: string): Promise<void>;
465
+ /**
466
+ * @noRailsEquivalent PERMANENT — Ruby core `File.utime`
467
+ * (`vendor/ruby/v3.3.11/file.c:2983`), over the backend's async `utimes`.
468
+ */
469
+ static utimeAsync(atime: Date, mtime: Date, path: string): Promise<void>;
470
+ /**
471
+ * `vendor/ruby/v3.3.11/file.c:2706` `rb_file_s_chown`, which answers the number of
472
+ * files whose owner was set. A `nil` owner or group is ignored
473
+ * (`file.c:2698`) — `File.chown(nil, 100, "testfile")` — which `to_uid` /
474
+ * `to_gid` (`file.c:2661,2670`) carry through as `-1`. A backend with no
475
+ * ownership has no `chownSync`, and there the call is a no-op.
476
+ *
477
+ * @noRailsEquivalent PERMANENT — Ruby core `File.chown`
478
+ * (`vendor/ruby/v3.3.11/file.c:2706`).
479
+ */
480
+ static chown(owner: number | null, group: number | null, ...files: string[]): number;
481
+ /**
482
+ * `vendor/ruby/v3.3.11/file.c:3231` `rb_file_s_rename`, which answers `0` and
483
+ * replaces `to` when it already exists.
484
+ *
485
+ * @noRailsEquivalent PERMANENT — Ruby core `File.rename`
486
+ * (`vendor/ruby/v3.3.11/file.c:3231`).
487
+ */
488
+ static rename(from: string, to: string): number;
489
+ /**
490
+ * `vendor/ruby/v3.3.11/file.c:2427` `rb_file_s_mtime`, the modification Time of a
491
+ * FOLLOWED symlink — it raises `ENOENT` rather than answering `nil` when the
492
+ * path does not exist.
493
+ *
494
+ * @noRailsEquivalent PERMANENT — Ruby core `File.mtime`
495
+ * (`vendor/ruby/v3.3.11/file.c:2427`).
496
+ */
497
+ static mtime(fileName: string): Date;
498
+ /**
499
+ * {@link File.mtime} over the backend's async `stat`.
500
+ *
501
+ * @noRailsEquivalent PERMANENT — Ruby core `File.mtime`
502
+ * (`vendor/ruby/v3.3.11/file.c:2427`).
503
+ */
504
+ static mtimeAsync(fileName: string): Promise<Date>;
505
+ /**
506
+ * `vendor/ruby/v3.3.11/file.c:4559` `rb_file_s_realpath`, which resolves every
507
+ * symlink and raises `ENOENT` when the path does not exist. A backend with
508
+ * no symlink support has no `realpathSync`, and there the path resolves
509
+ * lexically.
510
+ *
511
+ * @noRailsEquivalent PERMANENT — Ruby core `File.realpath`
512
+ * (`vendor/ruby/v3.3.11/file.c:4559`).
513
+ */
514
+ static realpath(pathname: string): string;
515
+ /**
516
+ * {@link File.realpath} over the backend's async `realpath`, resolving
517
+ * lexically where the backend has none.
518
+ *
519
+ * @noRailsEquivalent PERMANENT — Ruby core `File.realpath`
520
+ * (`vendor/ruby/v3.3.11/file.c:4559`).
521
+ */
522
+ static realpathAsync(pathname: string): Promise<string>;
523
+ /**
524
+ * `vendor/ruby/v3.3.11/file.c:4580` `rb_file_s_realdirpath`, {@link File.realpath}
525
+ * with the last component allowed to be missing, following a broken symlink
526
+ * to its target.
527
+ *
528
+ * @noRailsEquivalent PERMANENT — Ruby core `File.realdirpath`
529
+ * (`vendor/ruby/v3.3.11/file.c:4580`).
530
+ */
531
+ static realdirpathAsync(pathname: string): Promise<string>;
532
+ /**
533
+ * `vendor/ruby/v3.3.11/file.c:5013` `rb_file_join`, which is a STRING join and not
534
+ * a path normalization: `File.join("a", "..", "b")` is `"a/../b"`, where
535
+ * node's `path.join` answers `"b"`. A separator at the boundary is squeezed
536
+ * to one (`file.c:5061-5067`) — `File.join("a//", "/b")` is `"a/b"` — and an
537
+ * empty component keeps its separator, so `File.join("a", "")` is `"a/"`.
538
+ * Both boundary arms test with `isdirsep`, so a `File::ALT_SEPARATOR` at the
539
+ * boundary is a separator too: `File.join("a\\", "b")` is `"a\\b"` on
540
+ * Windows and `"a\\/b"` on POSIX. An Array component is joined first and
541
+ * spliced in (`file.c:5048-5054`), so an empty one contributes `""`:
542
+ * `File.join("a", [], "b")` is `"a/b"`.
543
+ *
544
+ * @noRailsEquivalent PERMANENT — Ruby core `File.join`
545
+ * (`vendor/ruby/v3.3.11/file.c:5013`).
546
+ */
547
+ static join(...args: FileJoinArg[]): string;
548
+ /** @noRailsEquivalent PERMANENT — Ruby core `File.split` (`rb_file_s_split`, `vendor/ruby/v3.3.11/file.c:4999-5004`). */
549
+ static split(path: string): [string, string];
550
+ /**
551
+ * `vendor/ruby/v3.3.11/file.c:4770` `rb_file_s_dirname`.
552
+ *
553
+ * @noRailsEquivalent PERMANENT — Ruby core `File.dirname`
554
+ * (`vendor/ruby/v3.3.11/file.c:4770`).
555
+ */
556
+ static dirname(fileName: string): string;
557
+ /**
558
+ * `vendor/ruby/v3.3.11/file.c:4705` `rb_file_s_basename`. The optional `suffix` is
559
+ * stripped, and the literal `".*"` strips whatever extension is there
560
+ * (`file.c:4664-4680`). A path of separators only answers `"/"`
561
+ * (`vendor/ruby/v3.3.11/file.c:4625` `ruby_enc_find_basename`).
562
+ *
563
+ * @noRailsEquivalent PERMANENT — Ruby core `File.basename`
564
+ * (`vendor/ruby/v3.3.11/file.c:4705`).
565
+ */
566
+ static basename(fileName: string | PathLike, suffix?: string): string;
567
+ /**
568
+ * `vendor/ruby/v3.3.11/file.c:4954` `rb_file_s_extname`: a leading dot is not an
569
+ * extension (`".bashrc"` is `""`) and a trailing dot is (`"b."` is `"."`).
570
+ *
571
+ * @noRailsEquivalent PERMANENT — Ruby core `File.extname`
572
+ * (`vendor/ruby/v3.3.11/file.c:4954`).
573
+ */
574
+ static extname(fileName: string): string;
575
+ /**
576
+ * `vendor/ruby/v3.3.11/dir.c:3457` `file_s_fnmatch` — `true` when `path` matches the
577
+ * glob `pattern`. Under `FNM_EXTGLOB` the pattern is brace-expanded first and
578
+ * the first alternative that matches wins (`dir.c:3471-3478`).
579
+ *
580
+ * @noRailsEquivalent PERMANENT — Ruby core `File.fnmatch`
581
+ * (`vendor/ruby/v3.3.11/dir.c:3457`).
582
+ */
583
+ static fnmatch(pattern: string, path: string, flags?: number): boolean;
584
+ /**
585
+ * `vendor/ruby/v3.3.11/file.c:4126` `rb_file_s_expand_path`, which resolves
586
+ * `fileName` against `dirString` — the working directory when it is omitted.
587
+ *
588
+ * @noRailsEquivalent PERMANENT — Ruby core `File.expand_path`
589
+ * (`vendor/ruby/v3.3.11/file.c:4126`).
590
+ */
591
+ static expandPath(fileName: string | {
592
+ toPath(): string;
593
+ }, dirString?: string | {
594
+ toPath(): string;
595
+ } | null): string;
596
+ /**
597
+ * `vendor/ruby/v3.3.11/file.c:4210` `rb_file_s_absolute_path_p`.
598
+ *
599
+ * @noRailsEquivalent PERMANENT — Ruby core `File.absolute_path?`
600
+ * (`vendor/ruby/v3.3.11/file.c:4210`).
601
+ */
602
+ static isAbsolutePath(fileName: string | {
603
+ toPath(): string;
604
+ }): boolean;
605
+ /**
606
+ * `vendor/ruby/v3.3.11/file.c:5301` `rb_file_flock`, which answers `0` once the lock
607
+ * is held. A backend with no advisory locking — node's `fs` exposes no
608
+ * `flock(2)` — has no `flockSync`, and there the stream is left unlocked,
609
+ * which is what an unlockable file already behaves like.
610
+ *
611
+ * @noRailsEquivalent PERMANENT — Ruby core `File#flock`
612
+ * (`vendor/ruby/v3.3.11/file.c:5301`).
613
+ */
614
+ flock(operation: number): number | false;
615
+ /**
616
+ * `vendor/ruby/v3.3.11/file.c:1330` `rb_file_size` — `fstat(2)` of the open
617
+ * descriptor, which is why it answers the bytes already written rather than
618
+ * what a stale `File.stat` of the path would say.
619
+ *
620
+ * @noRailsEquivalent PERMANENT — Ruby core `File#size`
621
+ * (`vendor/ruby/v3.3.11/file.c:1330`).
622
+ */
623
+ size(): number;
624
+ /**
625
+ * `vendor/ruby/v3.3.11/file.c:2599` `rb_file_chmod`, which answers `0`. MRI
626
+ * calls `fchmod(2)` on the descriptor; the `FsAdapter` contract has no
627
+ * `fchmodSync`, so the open file's path takes the mode instead.
628
+ *
629
+ * @noRailsEquivalent PERMANENT — Ruby core `File#chmod`
630
+ * (`vendor/ruby/v3.3.11/file.c:2599`).
631
+ */
632
+ chmod(mode: number): number;
633
+ }
634
+ export {};
635
+ //# sourceMappingURL=file.d.ts.map