@blazetrails/ruby-compat 0.0.0-stage → 0.1.0-alpha0.2
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.
- package/LICENSE +21 -0
- package/NOTICE +6 -0
- package/README.md +440 -2
- package/dist/argument-error.d.ts +15 -0
- package/dist/argument-error.js +15 -0
- package/dist/argument-error.js.map +1 -0
- package/dist/array.d.ts +415 -0
- package/dist/array.js +1330 -0
- package/dist/array.js.map +1 -0
- package/dist/async-context-adapter.d.ts +19 -0
- package/dist/async-context-adapter.js +139 -0
- package/dist/async-context-adapter.js.map +1 -0
- package/dist/backtrace-location.d.ts +78 -0
- package/dist/backtrace-location.js +158 -0
- package/dist/backtrace-location.js.map +1 -0
- package/dist/base64.d.ts +73 -0
- package/dist/base64.js +164 -0
- package/dist/base64.js.map +1 -0
- package/dist/benchmark.d.ts +19 -0
- package/dist/benchmark.js +16 -0
- package/dist/benchmark.js.map +1 -0
- package/dist/big-decimal.d.ts +111 -0
- package/dist/big-decimal.js +584 -0
- package/dist/big-decimal.js.map +1 -0
- package/dist/bundler.d.ts +44 -0
- package/dist/bundler.js +97 -0
- package/dist/bundler.js.map +1 -0
- package/dist/cgi.d.ts +89 -0
- package/dist/cgi.js +168 -0
- package/dist/cgi.js.map +1 -0
- package/dist/child-process-adapter.d.ts +110 -0
- package/dist/child-process-adapter.js +272 -0
- package/dist/child-process-adapter.js.map +1 -0
- package/dist/class-module.d.ts +10 -0
- package/dist/class-module.js +10 -0
- package/dist/class-module.js.map +1 -0
- package/dist/classpath.d.ts +93 -0
- package/dist/classpath.js +210 -0
- package/dist/classpath.js.map +1 -0
- package/dist/closed-queue-error.d.ts +10 -0
- package/dist/closed-queue-error.js +10 -0
- package/dist/closed-queue-error.js.map +1 -0
- package/dist/comparable.d.ts +127 -0
- package/dist/comparable.js +376 -0
- package/dist/comparable.js.map +1 -0
- package/dist/complex.d.ts +49 -0
- package/dist/complex.js +164 -0
- package/dist/complex.js.map +1 -0
- package/dist/concurrent/atomic-boolean.d.ts +24 -0
- package/dist/concurrent/atomic-boolean.js +43 -0
- package/dist/concurrent/atomic-boolean.js.map +1 -0
- package/dist/concurrent/atomic-fixnum.d.ts +21 -0
- package/dist/concurrent/atomic-fixnum.js +35 -0
- package/dist/concurrent/atomic-fixnum.js.map +1 -0
- package/dist/concurrent/count-down-latch.d.ts +20 -0
- package/dist/concurrent/count-down-latch.js +50 -0
- package/dist/concurrent/count-down-latch.js.map +1 -0
- package/dist/concurrent/cyclic-barrier.d.ts +18 -0
- package/dist/concurrent/cyclic-barrier.js +50 -0
- package/dist/concurrent/cyclic-barrier.js.map +1 -0
- package/dist/concurrent/event.d.ts +19 -0
- package/dist/concurrent/event.js +31 -0
- package/dist/concurrent/event.js.map +1 -0
- package/dist/concurrent/map.d.ts +149 -0
- package/dist/concurrent/map.js +202 -0
- package/dist/concurrent/map.js.map +1 -0
- package/dist/concurrent/read-write-lock.d.ts +25 -0
- package/dist/concurrent/read-write-lock.js +70 -0
- package/dist/concurrent/read-write-lock.js.map +1 -0
- package/dist/concurrent/semaphore.d.ts +24 -0
- package/dist/concurrent/semaphore.js +74 -0
- package/dist/concurrent/semaphore.js.map +1 -0
- package/dist/concurrent/timer-task.d.ts +52 -0
- package/dist/concurrent/timer-task.js +112 -0
- package/dist/concurrent/timer-task.js.map +1 -0
- package/dist/constants.generated.d.ts +2 -0
- package/dist/constants.generated.js +64 -0
- package/dist/constants.generated.js.map +1 -0
- package/dist/converter-not-found-error.d.ts +14 -0
- package/dist/converter-not-found-error.js +14 -0
- package/dist/converter-not-found-error.js.map +1 -0
- package/dist/crypto-adapter.d.ts +64 -0
- package/dist/crypto-adapter.js +365 -0
- package/dist/crypto-adapter.js.map +1 -0
- package/dist/delegate.d.ts +156 -0
- package/dist/delegate.js +306 -0
- package/dist/delegate.js.map +1 -0
- package/dist/digest.d.ts +99 -0
- package/dist/digest.js +131 -0
- package/dist/digest.js.map +1 -0
- package/dist/dir.d.ts +225 -0
- package/dist/dir.js +608 -0
- package/dist/dir.js.map +1 -0
- package/dist/encoding-error.d.ts +14 -0
- package/dist/encoding-error.js +17 -0
- package/dist/encoding-error.js.map +1 -0
- package/dist/encoding.d.ts +121 -0
- package/dist/encoding.js +306 -0
- package/dist/encoding.js.map +1 -0
- package/dist/ensure.d.ts +15 -0
- package/dist/ensure.js +35 -0
- package/dist/ensure.js.map +1 -0
- package/dist/enumerable.d.ts +375 -0
- package/dist/enumerable.js +1102 -0
- package/dist/enumerable.js.map +1 -0
- package/dist/enumerator.d.ts +324 -0
- package/dist/enumerator.js +625 -0
- package/dist/enumerator.js.map +1 -0
- package/dist/eof-error.d.ts +14 -0
- package/dist/eof-error.js +14 -0
- package/dist/eof-error.js.map +1 -0
- package/dist/errno.d.ts +447 -0
- package/dist/errno.js +616 -0
- package/dist/errno.js.map +1 -0
- package/dist/exc-detailed-message.d.ts +15 -0
- package/dist/exc-detailed-message.js +106 -0
- package/dist/exc-detailed-message.js.map +1 -0
- package/dist/exc-to-s.d.ts +10 -0
- package/dist/exc-to-s.js +21 -0
- package/dist/exc-to-s.js.map +1 -0
- package/dist/exception.d.ts +44 -0
- package/dist/exception.js +115 -0
- package/dist/exception.js.map +1 -0
- package/dist/fiber-error.d.ts +12 -0
- package/dist/fiber-error.js +12 -0
- package/dist/fiber-error.js.map +1 -0
- package/dist/fiber.d.ts +51 -0
- package/dist/fiber.js +178 -0
- package/dist/fiber.js.map +1 -0
- package/dist/file-utils.d.ts +480 -0
- package/dist/file-utils.js +1824 -0
- package/dist/file-utils.js.map +1 -0
- package/dist/file.d.ts +643 -0
- package/dist/file.js +1334 -0
- package/dist/file.js.map +1 -0
- package/dist/float-domain-error.d.ts +17 -0
- package/dist/float-domain-error.js +17 -0
- package/dist/float-domain-error.js.map +1 -0
- package/dist/fork-children.d.ts +23 -0
- package/dist/fork-children.js +32 -0
- package/dist/fork-children.js.map +1 -0
- package/dist/frozen-error.d.ts +33 -0
- package/dist/frozen-error.js +41 -0
- package/dist/frozen-error.js.map +1 -0
- package/dist/fs-adapter.d.ts +158 -0
- package/dist/fs-adapter.js +253 -0
- package/dist/fs-adapter.js.map +1 -0
- package/dist/gem/deprecate.d.ts +10 -0
- package/dist/gem/deprecate.js +8 -0
- package/dist/gem/deprecate.js.map +1 -0
- package/dist/gem/requirement.d.ts +55 -0
- package/dist/gem/requirement.js +91 -0
- package/dist/gem/requirement.js.map +1 -0
- package/dist/gem/version.d.ts +50 -0
- package/dist/gem/version.js +148 -0
- package/dist/gem/version.js.map +1 -0
- package/dist/gem.d.ts +59 -0
- package/dist/gem.js +82 -0
- package/dist/gem.js.map +1 -0
- package/dist/hash.d.ts +967 -0
- package/dist/hash.js +1572 -0
- package/dist/hash.js.map +1 -0
- package/dist/http-adapter.d.ts +124 -0
- package/dist/http-adapter.js +220 -0
- package/dist/http-adapter.js.map +1 -0
- package/dist/immediate-executor.d.ts +20 -0
- package/dist/immediate-executor.js +39 -0
- package/dist/immediate-executor.js.map +1 -0
- package/dist/include.d.ts +778 -0
- package/dist/include.js +2208 -0
- package/dist/include.js.map +1 -0
- package/dist/index-error.d.ts +13 -0
- package/dist/index-error.js +13 -0
- package/dist/index-error.js.map +1 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +166 -0
- package/dist/index.js.map +1 -0
- package/dist/invalid-byte-sequence-error.d.ts +62 -0
- package/dist/invalid-byte-sequence-error.js +75 -0
- package/dist/invalid-byte-sequence-error.js.map +1 -0
- package/dist/io-error.d.ts +14 -0
- package/dist/io-error.js +17 -0
- package/dist/io-error.js.map +1 -0
- package/dist/io.d.ts +867 -0
- package/dist/io.js +1960 -0
- package/dist/io.js.map +1 -0
- package/dist/ipaddr.d.ts +79 -0
- package/dist/ipaddr.js +405 -0
- package/dist/ipaddr.js.map +1 -0
- package/dist/json.d.ts +70 -0
- package/dist/json.js +181 -0
- package/dist/json.js.map +1 -0
- package/dist/kernel-catch.d.ts +59 -0
- package/dist/kernel-catch.js +184 -0
- package/dist/kernel-catch.js.map +1 -0
- package/dist/kernel-float.d.ts +19 -0
- package/dist/kernel-float.js +54 -0
- package/dist/kernel-float.js.map +1 -0
- package/dist/kernel-fork.d.ts +30 -0
- package/dist/kernel-fork.js +72 -0
- package/dist/kernel-fork.js.map +1 -0
- package/dist/kernel-format.d.ts +27 -0
- package/dist/kernel-format.js +901 -0
- package/dist/kernel-format.js.map +1 -0
- package/dist/kernel-hash.d.ts +7 -0
- package/dist/kernel-hash.js +33 -0
- package/dist/kernel-hash.js.map +1 -0
- package/dist/kernel-integer.d.ts +49 -0
- package/dist/kernel-integer.js +170 -0
- package/dist/kernel-integer.js.map +1 -0
- package/dist/kernel-rand.d.ts +16 -0
- package/dist/kernel-rand.js +237 -0
- package/dist/kernel-rand.js.map +1 -0
- package/dist/kernel-system.d.ts +39 -0
- package/dist/kernel-system.js +103 -0
- package/dist/kernel-system.js.map +1 -0
- package/dist/kernel-warn.d.ts +35 -0
- package/dist/kernel-warn.js +73 -0
- package/dist/kernel-warn.js.map +1 -0
- package/dist/key-error.d.ts +44 -0
- package/dist/key-error.js +59 -0
- package/dist/key-error.js.map +1 -0
- package/dist/keyword-splat.d.ts +41 -0
- package/dist/keyword-splat.js +65 -0
- package/dist/keyword-splat.js.map +1 -0
- package/dist/load-error.d.ts +19 -0
- package/dist/load-error.js +19 -0
- package/dist/load-error.js.map +1 -0
- package/dist/load.d.ts +128 -0
- package/dist/load.js +278 -0
- package/dist/load.js.map +1 -0
- package/dist/loaded-features.d.ts +13 -0
- package/dist/loaded-features.js +15 -0
- package/dist/loaded-features.js.map +1 -0
- package/dist/local-jump-error.d.ts +12 -0
- package/dist/local-jump-error.js +12 -0
- package/dist/local-jump-error.js.map +1 -0
- package/dist/logger/formatter.d.ts +21 -0
- package/dist/logger/formatter.js +43 -0
- package/dist/logger/formatter.js.map +1 -0
- package/dist/logger/log-device.d.ts +52 -0
- package/dist/logger/log-device.js +104 -0
- package/dist/logger/log-device.js.map +1 -0
- package/dist/logger/severity.d.ts +23 -0
- package/dist/logger/severity.js +42 -0
- package/dist/logger/severity.js.map +1 -0
- package/dist/logger.d.ts +127 -0
- package/dist/logger.js +218 -0
- package/dist/logger.js.map +1 -0
- package/dist/marshal.d.ts +83 -0
- package/dist/marshal.js +1487 -0
- package/dist/marshal.js.map +1 -0
- package/dist/match-data.d.ts +161 -0
- package/dist/match-data.js +284 -0
- package/dist/match-data.js.map +1 -0
- package/dist/method-cache.d.ts +81 -0
- package/dist/method-cache.js +109 -0
- package/dist/method-cache.js.map +1 -0
- package/dist/method-missing-proxy.d.ts +53 -0
- package/dist/method-missing-proxy.js +154 -0
- package/dist/method-missing-proxy.js.map +1 -0
- package/dist/method.d.ts +132 -0
- package/dist/method.js +320 -0
- package/dist/method.js.map +1 -0
- package/dist/monitor.d.ts +114 -0
- package/dist/monitor.js +270 -0
- package/dist/monitor.js.map +1 -0
- package/dist/mutex.d.ts +51 -0
- package/dist/mutex.js +150 -0
- package/dist/mutex.js.map +1 -0
- package/dist/name-error.d.ts +45 -0
- package/dist/name-error.js +54 -0
- package/dist/name-error.js.map +1 -0
- package/dist/net/http/exceptions.d.ts +31 -0
- package/dist/net/http/exceptions.js +46 -0
- package/dist/net/http/exceptions.js.map +1 -0
- package/dist/net/http/request.d.ts +137 -0
- package/dist/net/http/request.js +559 -0
- package/dist/net/http/request.js.map +1 -0
- package/dist/net/http/requests.d.ts +197 -0
- package/dist/net/http/requests.js +197 -0
- package/dist/net/http/requests.js.map +1 -0
- package/dist/net/http/response.d.ts +141 -0
- package/dist/net/http/response.js +416 -0
- package/dist/net/http/response.js.map +1 -0
- package/dist/net/http/responses.d.ts +345 -0
- package/dist/net/http/responses.js +486 -0
- package/dist/net/http/responses.js.map +1 -0
- package/dist/net/http.d.ts +278 -0
- package/dist/net/http.js +760 -0
- package/dist/net/http.js.map +1 -0
- package/dist/net/protocol.d.ts +227 -0
- package/dist/net/protocol.js +392 -0
- package/dist/net/protocol.js.map +1 -0
- package/dist/nil-class.d.ts +10 -0
- package/dist/nil-class.js +27 -0
- package/dist/nil-class.js.map +1 -0
- package/dist/no-method-error.d.ts +38 -0
- package/dist/no-method-error.js +45 -0
- package/dist/no-method-error.js.map +1 -0
- package/dist/not-implemented-error.d.ts +13 -0
- package/dist/not-implemented-error.js +13 -0
- package/dist/not-implemented-error.js.map +1 -0
- package/dist/numeric-class.d.ts +29 -0
- package/dist/numeric-class.js +41 -0
- package/dist/numeric-class.js.map +1 -0
- package/dist/numeric.d.ts +226 -0
- package/dist/numeric.js +848 -0
- package/dist/numeric.js.map +1 -0
- package/dist/object-space.d.ts +34 -0
- package/dist/object-space.js +152 -0
- package/dist/object-space.js.map +1 -0
- package/dist/object.d.ts +833 -0
- package/dist/object.js +2131 -0
- package/dist/object.js.map +1 -0
- package/dist/open-uri.d.ts +180 -0
- package/dist/open-uri.js +402 -0
- package/dist/open-uri.js.map +1 -0
- package/dist/open3.d.ts +69 -0
- package/dist/open3.js +134 -0
- package/dist/open3.js.map +1 -0
- package/dist/openssl.d.ts +479 -0
- package/dist/openssl.js +1052 -0
- package/dist/openssl.js.map +1 -0
- package/dist/optparse.d.ts +130 -0
- package/dist/optparse.js +457 -0
- package/dist/optparse.js.map +1 -0
- package/dist/os-adapter.d.ts +20 -0
- package/dist/os-adapter.js +95 -0
- package/dist/os-adapter.js.map +1 -0
- package/dist/pathname.d.ts +73 -0
- package/dist/pathname.js +412 -0
- package/dist/pathname.js.map +1 -0
- package/dist/pp.d.ts +60 -0
- package/dist/pp.js +195 -0
- package/dist/pp.js.map +1 -0
- package/dist/pretty-print.d.ts +89 -0
- package/dist/pretty-print.js +232 -0
- package/dist/pretty-print.js.map +1 -0
- package/dist/process-adapter.d.ts +229 -0
- package/dist/process-adapter.js +889 -0
- package/dist/process-adapter.js.map +1 -0
- package/dist/process.d.ts +202 -0
- package/dist/process.js +433 -0
- package/dist/process.js.map +1 -0
- package/dist/psych/class-loader.d.ts +92 -0
- package/dist/psych/class-loader.js +139 -0
- package/dist/psych/class-loader.js.map +1 -0
- package/dist/psych/coder.d.ts +144 -0
- package/dist/psych/coder.js +176 -0
- package/dist/psych/coder.js.map +1 -0
- package/dist/psych/core-ext.d.ts +8 -0
- package/dist/psych/core-ext.js +10 -0
- package/dist/psych/core-ext.js.map +1 -0
- package/dist/psych/emitter.d.ts +116 -0
- package/dist/psych/emitter.js +1130 -0
- package/dist/psych/emitter.js.map +1 -0
- package/dist/psych/exception.d.ts +43 -0
- package/dist/psych/exception.js +54 -0
- package/dist/psych/exception.js.map +1 -0
- package/dist/psych/handler.d.ts +59 -0
- package/dist/psych/handler.js +95 -0
- package/dist/psych/handler.js.map +1 -0
- package/dist/psych/handlers/document-stream.d.ts +17 -0
- package/dist/psych/handlers/document-stream.js +26 -0
- package/dist/psych/handlers/document-stream.js.map +1 -0
- package/dist/psych/nodes/alias.d.ts +15 -0
- package/dist/psych/nodes/alias.js +22 -0
- package/dist/psych/nodes/alias.js.map +1 -0
- package/dist/psych/nodes/document.d.ts +23 -0
- package/dist/psych/nodes/document.js +35 -0
- package/dist/psych/nodes/document.js.map +1 -0
- package/dist/psych/nodes/mapping.d.ts +25 -0
- package/dist/psych/nodes/mapping.js +35 -0
- package/dist/psych/nodes/mapping.js.map +1 -0
- package/dist/psych/nodes/node.d.ts +59 -0
- package/dist/psych/nodes/node.js +79 -0
- package/dist/psych/nodes/node.js.map +1 -0
- package/dist/psych/nodes/scalar.d.ts +35 -0
- package/dist/psych/nodes/scalar.js +47 -0
- package/dist/psych/nodes/scalar.js.map +1 -0
- package/dist/psych/nodes/sequence.d.ts +25 -0
- package/dist/psych/nodes/sequence.js +35 -0
- package/dist/psych/nodes/sequence.js.map +1 -0
- package/dist/psych/nodes/stream.d.ts +23 -0
- package/dist/psych/nodes/stream.js +31 -0
- package/dist/psych/nodes/stream.js.map +1 -0
- package/dist/psych/omap.d.ts +9 -0
- package/dist/psych/omap.js +9 -0
- package/dist/psych/omap.js.map +1 -0
- package/dist/psych/parser.d.ts +41 -0
- package/dist/psych/parser.js +139 -0
- package/dist/psych/parser.js.map +1 -0
- package/dist/psych/scalar-scanner.d.ts +31 -0
- package/dist/psych/scalar-scanner.js +169 -0
- package/dist/psych/scalar-scanner.js.map +1 -0
- package/dist/psych/syntax-error.d.ts +23 -0
- package/dist/psych/syntax-error.js +35 -0
- package/dist/psych/syntax-error.js.map +1 -0
- package/dist/psych/tree-builder.d.ts +51 -0
- package/dist/psych/tree-builder.js +118 -0
- package/dist/psych/tree-builder.js.map +1 -0
- package/dist/psych/visitors/depth-first.d.ts +27 -0
- package/dist/psych/visitors/depth-first.js +37 -0
- package/dist/psych/visitors/depth-first.js.map +1 -0
- package/dist/psych/visitors/emitter.d.ts +32 -0
- package/dist/psych/visitors/emitter.js +63 -0
- package/dist/psych/visitors/emitter.js.map +1 -0
- package/dist/psych/visitors/to-ruby.d.ts +110 -0
- package/dist/psych/visitors/to-ruby.js +396 -0
- package/dist/psych/visitors/to-ruby.js.map +1 -0
- package/dist/psych/visitors/visitor.d.ts +11 -0
- package/dist/psych/visitors/visitor.js +17 -0
- package/dist/psych/visitors/visitor.js.map +1 -0
- package/dist/psych/visitors/yaml-tree.d.ts +182 -0
- package/dist/psych/visitors/yaml-tree.js +593 -0
- package/dist/psych/visitors/yaml-tree.js.map +1 -0
- package/dist/psych-adapter.d.ts +65 -0
- package/dist/psych-adapter.js +121 -0
- package/dist/psych-adapter.js.map +1 -0
- package/dist/psych-yaml.d.ts +2 -0
- package/dist/psych-yaml.js +5 -0
- package/dist/psych-yaml.js.map +1 -0
- package/dist/psych.d.ts +257 -0
- package/dist/psych.js +332 -0
- package/dist/psych.js.map +1 -0
- package/dist/queue.d.ts +137 -0
- package/dist/queue.js +236 -0
- package/dist/queue.js.map +1 -0
- package/dist/racc/parser.d.ts +70 -0
- package/dist/racc/parser.js +206 -0
- package/dist/racc/parser.js.map +1 -0
- package/dist/range-error.d.ts +15 -0
- package/dist/range-error.js +15 -0
- package/dist/range-error.js.map +1 -0
- package/dist/range.d.ts +166 -0
- package/dist/range.js +421 -0
- package/dist/range.js.map +1 -0
- package/dist/rational.d.ts +168 -0
- package/dist/rational.js +587 -0
- package/dist/rational.js.map +1 -0
- package/dist/rb-config.d.ts +33 -0
- package/dist/rb-config.js +53 -0
- package/dist/rb-config.js.map +1 -0
- package/dist/rb-equal.d.ts +66 -0
- package/dist/rb-equal.js +262 -0
- package/dist/rb-equal.js.map +1 -0
- package/dist/rb-hash.d.ts +26 -0
- package/dist/rb-hash.js +108 -0
- package/dist/rb-hash.js.map +1 -0
- package/dist/regexp.d.ts +82 -0
- package/dist/regexp.js +191 -0
- package/dist/regexp.js.map +1 -0
- package/dist/repl-adapter.d.ts +270 -0
- package/dist/repl-adapter.js +562 -0
- package/dist/repl-adapter.js.map +1 -0
- package/dist/resolv.d.ts +30 -0
- package/dist/resolv.js +48 -0
- package/dist/resolv.js.map +1 -0
- package/dist/ruby-empty.d.ts +28 -0
- package/dist/ruby-empty.js +40 -0
- package/dist/ruby-empty.js.map +1 -0
- package/dist/ruby-platform.d.ts +39 -0
- package/dist/ruby-platform.js +49 -0
- package/dist/ruby-platform.js.map +1 -0
- package/dist/runtime-error.d.ts +15 -0
- package/dist/runtime-error.js +15 -0
- package/dist/runtime-error.js.map +1 -0
- package/dist/scheduled-task.d.ts +73 -0
- package/dist/scheduled-task.js +150 -0
- package/dist/scheduled-task.js.map +1 -0
- package/dist/secure-random.d.ts +50 -0
- package/dist/secure-random.js +141 -0
- package/dist/secure-random.js.map +1 -0
- package/dist/set.d.ts +158 -0
- package/dist/set.js +352 -0
- package/dist/set.js.map +1 -0
- package/dist/shellwords.d.ts +27 -0
- package/dist/shellwords.js +53 -0
- package/dist/shellwords.js.map +1 -0
- package/dist/signal-exception.d.ts +43 -0
- package/dist/signal-exception.js +88 -0
- package/dist/signal-exception.js.map +1 -0
- package/dist/socket.d.ts +230 -0
- package/dist/socket.js +484 -0
- package/dist/socket.js.map +1 -0
- package/dist/standard-error.d.ts +27 -0
- package/dist/standard-error.js +49 -0
- package/dist/standard-error.js.map +1 -0
- package/dist/stop-iteration.d.ts +10 -0
- package/dist/stop-iteration.js +10 -0
- package/dist/stop-iteration.js.map +1 -0
- package/dist/string/b.d.ts +19 -0
- package/dist/string/b.js +28 -0
- package/dist/string/b.js.map +1 -0
- package/dist/string/byte-methods.d.ts +57 -0
- package/dist/string/byte-methods.js +266 -0
- package/dist/string/byte-methods.js.map +1 -0
- package/dist/string/bytes.d.ts +35 -0
- package/dist/string/bytes.js +123 -0
- package/dist/string/bytes.js.map +1 -0
- package/dist/string/case-mapping.d.ts +57 -0
- package/dist/string/case-mapping.js +192 -0
- package/dist/string/case-mapping.js.map +1 -0
- package/dist/string/chomp.d.ts +15 -0
- package/dist/string/chomp.js +32 -0
- package/dist/string/chomp.js.map +1 -0
- package/dist/string/convert.d.ts +55 -0
- package/dist/string/convert.js +316 -0
- package/dist/string/convert.js.map +1 -0
- package/dist/string/delete.d.ts +14 -0
- package/dist/string/delete.js +17 -0
- package/dist/string/delete.js.map +1 -0
- package/dist/string/each.d.ts +108 -0
- package/dist/string/each.js +305 -0
- package/dist/string/each.js.map +1 -0
- package/dist/string/encode.d.ts +37 -0
- package/dist/string/encode.js +268 -0
- package/dist/string/encode.js.map +1 -0
- package/dist/string/force-encoding.d.ts +72 -0
- package/dist/string/force-encoding.js +147 -0
- package/dist/string/force-encoding.js.map +1 -0
- package/dist/string/inspect.d.ts +17 -0
- package/dist/string/inspect.js +81 -0
- package/dist/string/inspect.js.map +1 -0
- package/dist/string/method-table.d.ts +174 -0
- package/dist/string/method-table.js +805 -0
- package/dist/string/method-table.js.map +1 -0
- package/dist/string/scrub.d.ts +12 -0
- package/dist/string/scrub.js +33 -0
- package/dist/string/scrub.js.map +1 -0
- package/dist/string/slice.d.ts +26 -0
- package/dist/string/slice.js +73 -0
- package/dist/string/slice.js.map +1 -0
- package/dist/string/split.d.ts +11 -0
- package/dist/string/split.js +44 -0
- package/dist/string/split.js.map +1 -0
- package/dist/string/sub.d.ts +114 -0
- package/dist/string/sub.js +371 -0
- package/dist/string/sub.js.map +1 -0
- package/dist/string/succ.d.ts +14 -0
- package/dist/string/succ.js +118 -0
- package/dist/string/succ.js.map +1 -0
- package/dist/string/support.d.ts +142 -0
- package/dist/string/support.js +296 -0
- package/dist/string/support.js.map +1 -0
- package/dist/string/tr.d.ts +46 -0
- package/dist/string/tr.js +156 -0
- package/dist/string/tr.js.map +1 -0
- package/dist/string-io.d.ts +166 -0
- package/dist/string-io.js +248 -0
- package/dist/string-io.js.map +1 -0
- package/dist/string-scanner.d.ts +133 -0
- package/dist/string-scanner.js +248 -0
- package/dist/string-scanner.js.map +1 -0
- package/dist/struct.d.ts +54 -0
- package/dist/struct.js +222 -0
- package/dist/struct.js.map +1 -0
- package/dist/symbol.d.ts +48 -0
- package/dist/symbol.js +107 -0
- package/dist/symbol.js.map +1 -0
- package/dist/tempfile.d.ts +173 -0
- package/dist/tempfile.js +295 -0
- package/dist/tempfile.js.map +1 -0
- package/dist/temporal-tag.d.ts +23 -0
- package/dist/temporal-tag.js +29 -0
- package/dist/temporal-tag.js.map +1 -0
- package/dist/thread-error.d.ts +13 -0
- package/dist/thread-error.js +13 -0
- package/dist/thread-error.js.map +1 -0
- package/dist/thread-pool-executor.d.ts +121 -0
- package/dist/thread-pool-executor.js +254 -0
- package/dist/thread-pool-executor.js.map +1 -0
- package/dist/thread.d.ts +211 -0
- package/dist/thread.js +495 -0
- package/dist/thread.js.map +1 -0
- package/dist/timeout.d.ts +29 -0
- package/dist/timeout.js +41 -0
- package/dist/timeout.js.map +1 -0
- package/dist/tse.d.ts +40 -0
- package/dist/tse.js +66 -0
- package/dist/tse.js.map +1 -0
- package/dist/type-error.d.ts +14 -0
- package/dist/type-error.js +14 -0
- package/dist/type-error.js.map +1 -0
- package/dist/undefined-conversion-error.d.ts +10 -0
- package/dist/undefined-conversion-error.js +10 -0
- package/dist/undefined-conversion-error.js.map +1 -0
- package/dist/uri/common.d.ts +209 -0
- package/dist/uri/common.js +369 -0
- package/dist/uri/common.js.map +1 -0
- package/dist/uri/generic.d.ts +280 -0
- package/dist/uri/generic.js +806 -0
- package/dist/uri/generic.js.map +1 -0
- package/dist/uri/http.d.ts +23 -0
- package/dist/uri/http.js +30 -0
- package/dist/uri/http.js.map +1 -0
- package/dist/uri/https.d.ts +13 -0
- package/dist/uri/https.js +15 -0
- package/dist/uri/https.js.map +1 -0
- package/dist/uri/rfc2396-parser.d.ts +70 -0
- package/dist/uri/rfc2396-parser.js +264 -0
- package/dist/uri/rfc2396-parser.js.map +1 -0
- package/dist/uri/rfc3986-parser.d.ts +46 -0
- package/dist/uri/rfc3986-parser.js +171 -0
- package/dist/uri/rfc3986-parser.js.map +1 -0
- package/dist/uri.d.ts +13 -0
- package/dist/uri.js +13 -0
- package/dist/uri.js.map +1 -0
- package/dist/variable.d.ts +183 -0
- package/dist/variable.js +463 -0
- package/dist/variable.js.map +1 -0
- package/dist/verbose.d.ts +39 -0
- package/dist/verbose.js +49 -0
- package/dist/verbose.js.map +1 -0
- package/dist/yaml.d.ts +9 -0
- package/dist/yaml.js +9 -0
- package/dist/yaml.js.map +1 -0
- package/dist/zlib-adapter.d.ts +119 -0
- package/dist/zlib-adapter.js +230 -0
- package/dist/zlib-adapter.js.map +1 -0
- package/dist/zlib.d.ts +299 -0
- package/dist/zlib.js +679 -0
- package/dist/zlib.js.map +1 -0
- package/package.json +172 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argument-error.js","sourceRoot":"","sources":["../lib/argument-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAa;CAAG"}
|
package/dist/array.d.ts
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { Hash } from "./hash.js";
|
|
2
|
+
/**
|
|
3
|
+
* `pack_pack` (`vendor/ruby/v3.3.11/pack.c:197`), narrowed to the `m` directive
|
|
4
|
+
* (`pack.c:663-690`) — Base64, wrapped at `len` input bytes per line, or
|
|
5
|
+
* strict with no line breaks at all when the count is an explicit `0`. `m0` is
|
|
6
|
+
* what `Rack::Test::Session#basic_authorize` packs with
|
|
7
|
+
* (`vendor/rack-test/v2.2.0/lib/rack/test.rb:199`) — and to `U` (`pack.c:645-660`),
|
|
8
|
+
* one UTF-8 character per Integer, which `ActiveSupport::Multibyte::Chars`
|
|
9
|
+
* packs codepoints with (`multibyte/chars.rb:136,144`) — and to the `C`, `E`,
|
|
10
|
+
* `l<` and `@` directives `ActiveSupport::Cache::Coder` packs its header with
|
|
11
|
+
* (`cache/coder.rb:44,77-82`), and the `L>` `MessagePack::Bigint` packs its
|
|
12
|
+
* words with (`vendor/msgpack/v1.8.0/lib/msgpack/bigint.rb:8`), and the `q>` `MessagePack::Timestamp`
|
|
13
|
+
* packs a timestamp96's seconds with (`vendor/msgpack/v1.8.0/lib/msgpack/timestamp.rb:65`), and the `v`
|
|
14
|
+
* `Rack::Session::Encryptor` packs its padding length with (`vendor/rack-session/v2.1.1/lib/rack/session/encryptor.rb:173`): `C`, `l`,
|
|
15
|
+
* `L`, `q`, `Q`, `S` (`pack.c:483-487`) and `v` through `pack_integer` (`pack.c:477-551`), `E` (`pack.c:575-583`), and `@` growing or shrinking to
|
|
16
|
+
* an absolute byte position (`pack.c:617-639`), and to `u` (`pack.c:662-691`,
|
|
17
|
+
* uuencoded, its String read as its UTF-8 bytes) and `M` (`pack.c:693-698`,
|
|
18
|
+
* quoted-printable over `qpencode`), which the mail gem's
|
|
19
|
+
* `UnixToUnix` and `QuotedPrintable` encode with. Every other directive is a
|
|
20
|
+
* separate port, so each reaches `unknown_directive` (`pack.c:761`) here, and
|
|
21
|
+
* of the modifiers only `<` / `>` (`pack.c:268-277`) are ported.
|
|
22
|
+
*
|
|
23
|
+
* `C`, `E`, `l` and `@` answer bytes, one code unit per byte, as `m` does.
|
|
24
|
+
*
|
|
25
|
+
* A `U` result is a UTF-8 String (`pack.c:299-302`), so it is a JS string of
|
|
26
|
+
* those characters rather than of bytes; `String.fromCodePoint` is
|
|
27
|
+
* `rb_uv_to_utf8`, and raises past U+10FFFF, which JS strings cannot hold.
|
|
28
|
+
*
|
|
29
|
+
* The argument is read as bytes, one code unit per byte — ruby-compat's
|
|
30
|
+
* ASCII-8BIT convention — as `pack.c:663-690` reads `RSTRING_PTR` with no
|
|
31
|
+
* re-encoding. A caller holding a UTF-8 String passes its `String#b`.
|
|
32
|
+
*
|
|
33
|
+
* `*` is `0` for the `@Xxu` types, `1` for the `PMm` types and the array
|
|
34
|
+
* remainder otherwise (`pack.c:281-284`), so `m*` is `m` and `U*` takes every
|
|
35
|
+
* element. The
|
|
36
|
+
* `u`-only `len > 63` clamp (`pack.c:676`) is not reachable without that
|
|
37
|
+
* directive.
|
|
38
|
+
*
|
|
39
|
+
* The result is an ASCII-8BIT String, a `Uint8Array`, unless every directive
|
|
40
|
+
* is `m`, `M`, `u` or `U` (`enc_info`, `pack.c:298-310`, `:771-777`), when it
|
|
41
|
+
* is US-ASCII or UTF-8 text.
|
|
42
|
+
*
|
|
43
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#pack`
|
|
44
|
+
* (`vendor/ruby/v3.3.11/pack.c:197`).
|
|
45
|
+
*/
|
|
46
|
+
export declare function pack(ary: ReadonlyArray<string | Uint8Array | number | bigint>, fmt: "m" | "m0" | "M" | "u" | "U" | "U*"): string;
|
|
47
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `Array#pack` (`vendor/ruby/v3.3.11/pack.c:197`). */
|
|
48
|
+
export declare function pack(ary: ReadonlyArray<string | Uint8Array | number | bigint>, fmt: `${"a" | "A" | "Z" | "b" | "B" | "h" | "H" | "c" | "C" | "s" | "S" | "l" | "L" | "q" | "Q" | "j" | "J" | "i" | "I" | "n" | "N" | "v" | "V" | "f" | "F" | "e" | "E" | "d" | "D" | "g" | "G" | "x" | "X" | "@" | "w" | "p" | "P"}${string}`): Uint8Array;
|
|
49
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `Array#pack` (`vendor/ruby/v3.3.11/pack.c:197`). */
|
|
50
|
+
export declare function pack(ary: ReadonlyArray<string | Uint8Array | number | bigint>, fmt: string): string | Uint8Array;
|
|
51
|
+
/**
|
|
52
|
+
* `rb_ary_fetch` (`vendor/ruby/v3.3.11/array.c:1961`) in its one-argument form:
|
|
53
|
+
* a negative index counts from the end, and one outside the array raises
|
|
54
|
+
* `IndexError` (`array.c:1981`).
|
|
55
|
+
*
|
|
56
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#fetch`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function rbAryFetch<T>(ary: readonly T[], pos: number): T;
|
|
59
|
+
/**
|
|
60
|
+
* `rb_ary_bsearch_index` (`vendor/ruby/v3.3.11/array.c:3513`): the find-minimum
|
|
61
|
+
* mode for a `true`/`false`/`nil` block, and the find-any mode for a numeric one.
|
|
62
|
+
*
|
|
63
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#bsearch_index`.
|
|
64
|
+
*/
|
|
65
|
+
export declare function rbAryBsearchIndex<T>(ary: readonly T[], block: (val: T) => unknown): number | null;
|
|
66
|
+
/**
|
|
67
|
+
* `rb_ary_bsearch` (`vendor/ruby/v3.3.11/array.c:3493`).
|
|
68
|
+
*
|
|
69
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#bsearch`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function rbAryBsearch<T>(ary: readonly T[], block: (val: T) => unknown): T | null;
|
|
72
|
+
/**
|
|
73
|
+
* `rb_ary_replace` (`vendor/ruby/v3.3.11/array.c:4531`): `copy`'s contents
|
|
74
|
+
* become `orig`'s, in place, and `copy` is returned.
|
|
75
|
+
*
|
|
76
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#replace`.
|
|
77
|
+
*/
|
|
78
|
+
export declare function rbAryReplace<T>(copy: T[], orig: readonly T[]): T[];
|
|
79
|
+
/**
|
|
80
|
+
* @noRailsEquivalent PERMANENT — Ruby core `String#unpack1`, the `h` and `H`
|
|
81
|
+
* directives (`vendor/ruby/v3.3.11/pack.c:1125,1145`).
|
|
82
|
+
*/
|
|
83
|
+
export declare function unpack1(str: string | Uint8Array, fmt: `h${string}` | `H${string}`, options?: {
|
|
84
|
+
offset?: number;
|
|
85
|
+
}): string | null;
|
|
86
|
+
/**
|
|
87
|
+
* @noRailsEquivalent PERMANENT — Ruby core `String#unpack1`, the `q` and `Q`
|
|
88
|
+
* directives (`vendor/ruby/v3.3.11/pack.c:1219,1225`), whose 64-bit value is a
|
|
89
|
+
* `bigint` past 2**53.
|
|
90
|
+
*/
|
|
91
|
+
export declare function unpack1(str: string | Uint8Array, fmt: `${string}q${string}` | `${string}Q${string}`, options?: {
|
|
92
|
+
offset?: number;
|
|
93
|
+
}): number | bigint | null;
|
|
94
|
+
/**
|
|
95
|
+
* `String#unpack1` (`vendor/ruby/v3.3.11/pack.c:1621` `pack_unpack1`), which is
|
|
96
|
+
* `pack_unpack_internal` (`pack.c:936`) in `UNPACK_1` mode: the first item
|
|
97
|
+
* the format pushes, or nil when none does. Narrowed to the directives
|
|
98
|
+
* {@link pack} answers bytes for — `C`, `l`, `L`, `q`, `Q`, `S` (`pack.c:1189`) and `v` through `unpack_integer`
|
|
99
|
+
* (`pack.c:1177-1281`), `E` (`pack.c:1306-1315`), and `@` moving to an
|
|
100
|
+
* absolute byte position (`pack.c:1531-1535`) — plus the `<` / `>` modifiers
|
|
101
|
+
* (`pack.c:1014-1023`). Every other directive reaches `unknown_directive`.
|
|
102
|
+
*
|
|
103
|
+
* `str` is read as bytes, one code unit per byte, as {@link pack} writes them,
|
|
104
|
+
* or as the bytes of a `Uint8Array`, the binary String seat.
|
|
105
|
+
* `PACK_LENGTH_ADJUST_SIZE` (`pack.c:904-912`) caps a count at what the rest
|
|
106
|
+
* of the string holds, so an item short of bytes pushes nothing.
|
|
107
|
+
*
|
|
108
|
+
* @noRailsEquivalent PERMANENT — Ruby core `String#unpack1`
|
|
109
|
+
* (`vendor/ruby/v3.3.11/pack.c:1621`).
|
|
110
|
+
*/
|
|
111
|
+
export declare function unpack1(str: string | Uint8Array, fmt: string, options?: {
|
|
112
|
+
offset?: number;
|
|
113
|
+
}): number | null;
|
|
114
|
+
/**
|
|
115
|
+
* `String#unpack` (`vendor/ruby/v3.3.11/pack.c:1611` `pack_unpack`):
|
|
116
|
+
* `pack_unpack_internal` in `UNPACK_ARRAY` mode, every item the format
|
|
117
|
+
* pushes. The directives are {@link unpack1}'s, plus `u` (`pack.c:1362`),
|
|
118
|
+
* `m` (`pack.c:1417`) and `M` (`pack.c:1498`), each pushing an ASCII-8BIT
|
|
119
|
+
* String, a `Uint8Array`.
|
|
120
|
+
*
|
|
121
|
+
* @noRailsEquivalent PERMANENT
|
|
122
|
+
*/
|
|
123
|
+
export declare function unpack(str: string | Uint8Array, fmt: string, { offset }?: {
|
|
124
|
+
offset?: number;
|
|
125
|
+
}): (number | bigint | string | Uint8Array)[];
|
|
126
|
+
/**
|
|
127
|
+
* Ruby `Array#slice` / `Array#[]` (`vendor/ruby/v3.3.11/array.c:1827` `rb_ary_aref`):
|
|
128
|
+
* `(index)` answers the element or nil, `(start, length)` a subarray
|
|
129
|
+
* (`rb_ary_aref2`, `:1837`), and a Range a subarray through
|
|
130
|
+
* `rb_range_beg_len` (`vendor/ruby/v3.3.11/range.c:1744`); an out-of-range start is nil.
|
|
131
|
+
* @noRailsEquivalent PERMANENT
|
|
132
|
+
*/
|
|
133
|
+
export declare function arySlice<T>(ary: readonly T[], arg: unknown, length?: unknown): T | T[] | null;
|
|
134
|
+
/**
|
|
135
|
+
* Mirrors: Ruby's Array#sort_by! — `vendor/ruby/v3.3.11/array.c:3593`
|
|
136
|
+
* `rb_ary_sort_by_bang`, which replaces the receiver's elements with
|
|
137
|
+
* `sort_by`'s result and answers the receiver.
|
|
138
|
+
*
|
|
139
|
+
* @noRailsEquivalent PERMANENT
|
|
140
|
+
*/
|
|
141
|
+
export declare function sortByBang<T>(ary: T[], block: (item: T) => unknown): T[];
|
|
142
|
+
/**
|
|
143
|
+
* Ruby `Array#delete_if` (`vendor/ruby/v3.3.11/array.c:4330` `rb_ary_delete_if`):
|
|
144
|
+
* removes, in place, every element the block answers truthily for
|
|
145
|
+
* (`reject_bang_i`, `array.c:4225`) and answers the receiver. When the block
|
|
146
|
+
* raises, the elements not yet visited are kept after the ones already
|
|
147
|
+
* retained (`select_bang_ensure`, `array.c:3841`).
|
|
148
|
+
*
|
|
149
|
+
* @noRailsEquivalent PERMANENT
|
|
150
|
+
*/
|
|
151
|
+
export declare function aryDeleteIf<T>(ary: T[], block: (item: T) => unknown): T[];
|
|
152
|
+
/**
|
|
153
|
+
* Ruby `Array#delete` (`vendor/ruby/v3.3.11/array.c:3973` `rb_ary_delete`): removes, in
|
|
154
|
+
* place, every element `==` to `item` (`rb_equal`, so a record matches by
|
|
155
|
+
* `ActiveRecord::Core#==`, not identity) and answers the last one removed.
|
|
156
|
+
* When nothing matched it answers the block's value for `item`, or nil.
|
|
157
|
+
*
|
|
158
|
+
* @noRailsEquivalent PERMANENT
|
|
159
|
+
*/
|
|
160
|
+
export declare function aryDelete<T, U = undefined>(ary: T[], item: T, block?: (item: T) => U): T | U;
|
|
161
|
+
/**
|
|
162
|
+
* Ruby `Array#delete_at` (`vendor/ruby/v3.3.11/array.c:4072` `rb_ary_delete_at_m`,
|
|
163
|
+
* over `rb_ary_delete_at`, `array.c:4027`): removes, in place, the element at
|
|
164
|
+
* `pos` and answers it. A negative `pos` counts back from the end, and one out
|
|
165
|
+
* of range either way answers `nil` and leaves the array alone.
|
|
166
|
+
*
|
|
167
|
+
* @noRailsEquivalent PERMANENT
|
|
168
|
+
*/
|
|
169
|
+
export declare function deleteAt<T>(ary: T[], pos: number): T | null;
|
|
170
|
+
/**
|
|
171
|
+
* Ruby `Array#first(n)` (`ary_take_first_or_last_n`,
|
|
172
|
+
* `vendor/ruby/v3.3.11/array.c:1292`): at most `n` elements, and
|
|
173
|
+
* `ArgumentError` for a negative `n`.
|
|
174
|
+
*
|
|
175
|
+
* @noRailsEquivalent PERMANENT
|
|
176
|
+
*/
|
|
177
|
+
export declare function rbAryFirst<T>(ary: readonly T[], n: number): T[];
|
|
178
|
+
/**
|
|
179
|
+
* Ruby `Array#first` with no argument (`vendor/ruby/v3.3.11/array.c:1901` `ary_first`):
|
|
180
|
+
* the first element, or `nil` for an empty array. Any other enumerable is
|
|
181
|
+
* `Enumerable#first` (`vendor/ruby/v3.3.11/enum.c:1284` `enum_first`), whose
|
|
182
|
+
* `first_i` (`enum.c:1245`) breaks out of `each` at the first element. A
|
|
183
|
+
* receiver that is neither answers its own `first` (`rb_funcallv`,
|
|
184
|
+
* `vendor/ruby/v3.3.11/vm_eval.c:1080`), a method called or a reader read, or raises `NoMethodError` (`rb_method_missing`,
|
|
185
|
+
* `vendor/ruby/v3.3.11/vm_eval.c:869`).
|
|
186
|
+
*
|
|
187
|
+
* @noRailsEquivalent PERMANENT
|
|
188
|
+
*/
|
|
189
|
+
export declare function first<T>(ary: Iterable<T>): T | null;
|
|
190
|
+
/**
|
|
191
|
+
* Ruby `Array#last` (`vendor/ruby/v3.3.11/array.c:1914` `rb_ary_last`): the last
|
|
192
|
+
* element, or `nil` for an empty array (`ary_last`, `array.c:1907`); with `n`,
|
|
193
|
+
* the last `n` elements in order. `n` past the length takes them all, and a
|
|
194
|
+
* negative `n` raises (`ary_take_first_or_last_n`, `array.c:1292-1307`). A
|
|
195
|
+
* non-Array receiver answers its own `last` (`rb_funcallv`, `vendor/ruby/v3.3.11/vm_eval.c:1080`).
|
|
196
|
+
*
|
|
197
|
+
* @noRailsEquivalent PERMANENT
|
|
198
|
+
*/
|
|
199
|
+
export declare function last<T>(ary: readonly T[]): T | null;
|
|
200
|
+
/** @noRailsEquivalent PERMANENT — Ruby core `Array#last` (`vendor/ruby/v3.3.11/array.c:1914`). */
|
|
201
|
+
export declare function last<T>(ary: readonly T[], n: number): T[];
|
|
202
|
+
/** @noRailsEquivalent PERMANENT — `rb_funcallv` (`vendor/ruby/v3.3.11/vm_eval.c:1080`) on a receiver's own `last`. */
|
|
203
|
+
export declare function last(ary: {
|
|
204
|
+
readonly last: unknown;
|
|
205
|
+
}): unknown;
|
|
206
|
+
/**
|
|
207
|
+
* Ruby `Array#count` (`vendor/ruby/v3.3.11/array.c:6275` `rb_ary_count`): the number
|
|
208
|
+
* of elements the block answers truthily for (`RTEST`), or the length with no
|
|
209
|
+
* block. The `count(obj)` arm is not ported: nothing calls it.
|
|
210
|
+
*
|
|
211
|
+
* @noRailsEquivalent PERMANENT
|
|
212
|
+
*/
|
|
213
|
+
export declare function aryCount<T>(ary: readonly T[], block?: (item: T) => unknown): number;
|
|
214
|
+
/**
|
|
215
|
+
* Ruby `Array#reject` (`vendor/ruby/v3.3.11/array.c:4301` `rb_ary_reject`): a new
|
|
216
|
+
* array of the elements the block does not answer truthily for (`RTEST`,
|
|
217
|
+
* `ary_reject`, `:4210`). Each block result is awaited before the next element
|
|
218
|
+
* is yielded, so a block that awaits still runs in order, one at a time. The
|
|
219
|
+
* block-less enumerator arm is not ported: nothing calls it.
|
|
220
|
+
*
|
|
221
|
+
* @noRailsEquivalent PERMANENT
|
|
222
|
+
*/
|
|
223
|
+
export declare function aryReject<T>(ary: readonly T[], block: (item: T) => unknown): Promise<T[]>;
|
|
224
|
+
/**
|
|
225
|
+
* Ruby `Array#each` (`vendor/ruby/v3.3.11/array.c:2532` `rb_ary_each`): yields each
|
|
226
|
+
* element and returns the receiver. With no block it is
|
|
227
|
+
* `RETURN_SIZED_ENUMERATOR` (`:2535`), whose elements are the receiver's. A `Set`
|
|
228
|
+
* yields its members, and a `Map` or plain Hash its `[key, value]` pairs, as
|
|
229
|
+
* `rb_hash_each_pair` does (`vendor/ruby/v3.3.11/hash.c`).
|
|
230
|
+
*
|
|
231
|
+
* @noRailsEquivalent PERMANENT
|
|
232
|
+
*/
|
|
233
|
+
export declare function each<R extends object>(recv: R, block?: (item: R extends Iterable<infer T> ? T : R extends {
|
|
234
|
+
each(block: (item: infer U) => unknown): unknown;
|
|
235
|
+
} ? U : [string, unknown]) => unknown): R;
|
|
236
|
+
/**
|
|
237
|
+
* Ruby `Array#to_h` (`vendor/ruby/v3.3.11/array.c:2988` `rb_ary_to_h`): a Hash of
|
|
238
|
+
* the receiver's `[key, value]` pairs, or of the pairs the block answers for
|
|
239
|
+
* each element.
|
|
240
|
+
*
|
|
241
|
+
* @noRailsEquivalent PERMANENT
|
|
242
|
+
*/
|
|
243
|
+
export declare function toH<K = unknown, V = unknown, T = unknown>(ary: readonly T[], block?: (e: T) => readonly [K, V]): Hash<K, V>;
|
|
244
|
+
/**
|
|
245
|
+
* The `to_h` send for any other receiver: its own `toH`, and a plain object,
|
|
246
|
+
* which is a Hash, answers itself (`vendor/ruby/v3.3.11/hash.c:3018` `rb_hash_to_h`).
|
|
247
|
+
*
|
|
248
|
+
* @noRailsEquivalent PERMANENT
|
|
249
|
+
*/
|
|
250
|
+
export declare function toH<T extends object>(obj: T | {
|
|
251
|
+
toH(): T;
|
|
252
|
+
}): T;
|
|
253
|
+
/**
|
|
254
|
+
* Ruby `Array#to_a` (`vendor/ruby/v3.3.11/array.c:2952` `rb_ary_to_a`): the receiver
|
|
255
|
+
* itself, or a plain-Array copy of an instance of an Array subclass.
|
|
256
|
+
*
|
|
257
|
+
* @noRailsEquivalent PERMANENT
|
|
258
|
+
*/
|
|
259
|
+
export declare function toA<T>(ary: T[]): T[];
|
|
260
|
+
/**
|
|
261
|
+
* `Hash#to_a` (`vendor/ruby/v3.3.11/hash.c:3428` `rb_hash_to_a`), its `[key, value]`
|
|
262
|
+
* pairs, for a `Map` or a plain object, and `Enumerable#to_a` (`enum.c:711`
|
|
263
|
+
* `enum_to_a`) for a `Set`: each element the receiver iterates, in order.
|
|
264
|
+
*
|
|
265
|
+
* @noRailsEquivalent PERMANENT
|
|
266
|
+
*/
|
|
267
|
+
export declare function toA<T>(enumerable: Iterable<T>): T[];
|
|
268
|
+
/** @noRailsEquivalent PERMANENT */
|
|
269
|
+
export declare function toA(hash: object): unknown[];
|
|
270
|
+
/**
|
|
271
|
+
* Ruby `Array#take` (`vendor/ruby/v3.3.11/array.c:7532` `rb_ary_take`): the first `n` elements.
|
|
272
|
+
* @noRailsEquivalent PERMANENT
|
|
273
|
+
*/
|
|
274
|
+
export declare function take<T>(ary: readonly T[], n: number): T[];
|
|
275
|
+
/**
|
|
276
|
+
* Ruby `Array#compact` (`vendor/ruby/v3.3.11/array.c:6240` `rb_ary_compact`): a new
|
|
277
|
+
* array with every `nil` element removed.
|
|
278
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#compact`
|
|
279
|
+
* (`vendor/ruby/v3.3.11/array.c:6240`).
|
|
280
|
+
*/
|
|
281
|
+
export declare function compact<T>(ary: readonly T[]): Array<NonNullable<T>>;
|
|
282
|
+
/**
|
|
283
|
+
* Ruby `Array#compact!` (`vendor/ruby/v3.3.11/array.c:6207` `rb_ary_compact_bang`):
|
|
284
|
+
* removes every `nil` element in place, answering the array, or `nil` when
|
|
285
|
+
* none was removed.
|
|
286
|
+
*
|
|
287
|
+
* @noRailsEquivalent PERMANENT
|
|
288
|
+
*/
|
|
289
|
+
export declare function compactBang<T>(ary: T[]): T[] | null;
|
|
290
|
+
/**
|
|
291
|
+
* `rb_check_array_type` (`vendor/ruby/v3.3.11/array.c:975`, over
|
|
292
|
+
* `rb_check_convert_type_with_id`, `vendor/ruby/v3.3.11/object.c:3184`): an
|
|
293
|
+
* Array, its `to_ary`, or nil. A `to_ary` answering anything else raises.
|
|
294
|
+
*
|
|
295
|
+
* @noRailsEquivalent PERMANENT
|
|
296
|
+
*/
|
|
297
|
+
export declare function rbCheckArrayType(ary: unknown): unknown[] | null;
|
|
298
|
+
/**
|
|
299
|
+
* `Kernel#Array` (`rb_f_array`, `vendor/ruby/v3.3.11/object.c:3825`, over
|
|
300
|
+
* `rb_Array`, `vendor/ruby/v3.3.11/object.c:3791`): the
|
|
301
|
+
* argument's `to_ary`, else its `to_a`, else the argument in a one-element
|
|
302
|
+
* Array.
|
|
303
|
+
*
|
|
304
|
+
* @noRailsEquivalent PERMANENT
|
|
305
|
+
*/
|
|
306
|
+
export declare function rbFArray(val: unknown): unknown[];
|
|
307
|
+
/**
|
|
308
|
+
* Ruby `Array#flatten` with no level (`vendor/ruby/v3.3.11/array.c:6476`
|
|
309
|
+
* `rb_ary_flatten`, over `flatten`, `array.c:6305`): every element that
|
|
310
|
+
* answers {@link rbCheckArrayType} is replaced by its own flattened elements,
|
|
311
|
+
* and an array reached again on its own path raises.
|
|
312
|
+
*
|
|
313
|
+
* @noRailsEquivalent PERMANENT
|
|
314
|
+
*/
|
|
315
|
+
export declare function flatten(ary: readonly unknown[]): unknown[];
|
|
316
|
+
/**
|
|
317
|
+
* Ruby `Array#uniq` (`vendor/ruby/v3.3.11/array.c:6177` `rb_ary_uniq`): the elements in
|
|
318
|
+
* order, deduplicated through `ary_make_hash` (`array.c:5342`) — a Hash, so it
|
|
319
|
+
* keys on `hash`/`eql?`, never `==` or identity: `1` and `1n` collapse the way
|
|
320
|
+
* Ruby's `1` and `1` do, a tuple is `eql?` by its elements, and a value whose
|
|
321
|
+
* class defines only `==` stays distinct. With a block, each element is keyed
|
|
322
|
+
* on the block's result (`ary_make_hash_by`, `array.c:5361`) and the first
|
|
323
|
+
* element for each key is kept.
|
|
324
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#uniq`
|
|
325
|
+
* (`vendor/ruby/v3.3.11/array.c:6177`).
|
|
326
|
+
*/
|
|
327
|
+
export declare function uniq<T>(ary: readonly T[], block?: (element: T) => unknown): T[];
|
|
328
|
+
/**
|
|
329
|
+
* Ruby `Array#uniq!` (`vendor/ruby/v3.3.11/array.c:6124` `rb_ary_uniq_bang`):
|
|
330
|
+
* deduplicates in place as {@link uniq} does, answering the array, or `nil`
|
|
331
|
+
* when nothing was removed.
|
|
332
|
+
*
|
|
333
|
+
* @noRailsEquivalent PERMANENT
|
|
334
|
+
*/
|
|
335
|
+
export declare function uniqBang<T>(ary: T[], block?: (element: T) => unknown): T[] | null;
|
|
336
|
+
/**
|
|
337
|
+
* Ruby `Array#include?` (`vendor/ruby/v3.3.11/array.c:5222` `rb_ary_includes`):
|
|
338
|
+
* whether an element is `==` to `item`. Each element is the receiver of the
|
|
339
|
+
* `rb_equal` send, so a class's own `==` answers where a JS `includes`
|
|
340
|
+
* compares identity.
|
|
341
|
+
*
|
|
342
|
+
* @noRailsEquivalent PERMANENT
|
|
343
|
+
*/
|
|
344
|
+
export declare function aryIncludes<T>(ary: readonly T[], item: unknown): boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Ruby `Array#|` (`vendor/ruby/v3.3.11/array.c:5600` `rb_ary_or`): `ary1`'s
|
|
347
|
+
* elements then `ary2`'s, deduplicated across both the way `uniq` is — by
|
|
348
|
+
* `hash`/`eql?` (`rb_ary_union`, `array.c:5562`), so two separately built
|
|
349
|
+
* `eql?` tuples or Hashes collapse where a JS `includes` would keep both.
|
|
350
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#|`
|
|
351
|
+
* (`vendor/ruby/v3.3.11/array.c:5600`).
|
|
352
|
+
*/
|
|
353
|
+
export declare function union<T>(ary1: readonly T[], ary2: readonly T[]): T[];
|
|
354
|
+
/**
|
|
355
|
+
* Ruby `Array#product` (`vendor/ruby/v3.3.11/array.c:7426` `rb_ary_product`), the
|
|
356
|
+
* block-less form: every combination taking one element from `ary` and one from
|
|
357
|
+
* each of `args`, the last array varying fastest.
|
|
358
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#product`.
|
|
359
|
+
*/
|
|
360
|
+
export declare function product<T>(ary: readonly T[], ...args: (readonly T[])[]): T[][];
|
|
361
|
+
/**
|
|
362
|
+
* Ruby `Array#intersect?` (`vendor/ruby/v3.3.11/array.c:5680` `rb_ary_intersect_p`):
|
|
363
|
+
* whether the two arrays share an element, compared by `eql?` as
|
|
364
|
+
* `rb_ary_includes_by_eql` does. An empty array on either side answers false.
|
|
365
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#intersect?`
|
|
366
|
+
* (`vendor/ruby/v3.3.11/array.c:5680`).
|
|
367
|
+
*/
|
|
368
|
+
export declare function isIntersect<T>(ary1: readonly T[], ary2: readonly T[]): boolean;
|
|
369
|
+
/**
|
|
370
|
+
* Ruby `Array#sort` without a block (`vendor/ruby/v3.3.11/array.c:3473` `rb_ary_sort`):
|
|
371
|
+
* a sorted copy, ordered by `sort_2` (`array.c:3301`), which sends `<=>` and
|
|
372
|
+
* hands the answer to `rb_cmpint`, so a `nil` `<=>` raises
|
|
373
|
+
* `ArgumentError: comparison of A with B failed`.
|
|
374
|
+
*
|
|
375
|
+
* @boundary: `ruby_qsort` (`vendor/ruby/v3.3.11/util.c:253`) is the platform `qsort_s`,
|
|
376
|
+
* glibc's merge sort, which always passes the earlier element first. V8's
|
|
377
|
+
* `Array#sort` does not, and the order names the classes in the message, so
|
|
378
|
+
* the merge is written out.
|
|
379
|
+
*
|
|
380
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#sort` (`vendor/ruby/v3.3.11/array.c:3473`).
|
|
381
|
+
*/
|
|
382
|
+
export declare function sort<T>(ary: readonly T[]): T[];
|
|
383
|
+
/**
|
|
384
|
+
* Ruby `Array#join` (`vendor/ruby/v3.3.11/array.c:2806` `rb_ary_join`, over
|
|
385
|
+
* `ary_join_1` at `:2778`): each element's string with `sep` between them. A
|
|
386
|
+
* nested Array is joined in place with the same `sep` (`ary_join_1_ary`,
|
|
387
|
+
* `:2760`), and one that contains itself raises `ArgumentError`. Every other
|
|
388
|
+
* element is sent `to_s` (`rb_obj_as_string`), so a Symbol (`":name"`)
|
|
389
|
+
* contributes its name. A nil `sep` is `$,`, which is nil: nothing between.
|
|
390
|
+
* @noRailsEquivalent PERMANENT
|
|
391
|
+
*/
|
|
392
|
+
export declare function aryJoin(ary: readonly unknown[], sep?: string | null): string;
|
|
393
|
+
type ArrayMethod = (self: unknown[], ...args: never[]) => unknown;
|
|
394
|
+
/**
|
|
395
|
+
* The Array methods `rbFSend` dispatches and `basicObjRespondTo` answers for
|
|
396
|
+
* that a JS array has no member for, keyed by the camelCased Ruby name as
|
|
397
|
+
* `STRING_METHOD_TABLE` keys String's. They are the ones `Init_Array`
|
|
398
|
+
* (`vendor/ruby/v3.3.11/array.c:8606`) and `Enumerable`
|
|
399
|
+
* (`vendor/ruby/v3.3.11/enum.c:5047`) define that a Relation sends its
|
|
400
|
+
* records: by `delegate ..., to: :records`
|
|
401
|
+
* (`vendor/rails/v8.0.5.2/activerecord/lib/active_record/relation/delegation.rb:98-103`)
|
|
402
|
+
* and by `include Enumerable`
|
|
403
|
+
* (`vendor/rails/v8.0.5.2/activerecord/lib/active_record/relation.rb:67`).
|
|
404
|
+
* A name the ported `Enumerable` module answers is not repeated here. `-`, `|` and `&` go by the method Ruby
|
|
405
|
+
* also names them (`difference`, `union`, `intersection`) and `+` is `plus`;
|
|
406
|
+
* a block is a trailing `rbObjIsProc` function, and with no block an
|
|
407
|
+
* entry answers a copy of the Array its enumerator would yield. A package
|
|
408
|
+
* that reopens Array, as ActiveSupport's `core_ext/array` does, assigns an
|
|
409
|
+
* entry.
|
|
410
|
+
*
|
|
411
|
+
* @noRailsEquivalent PERMANENT
|
|
412
|
+
*/
|
|
413
|
+
export declare const ARRAY_METHOD_TABLE: Record<string, ArrayMethod>;
|
|
414
|
+
export {};
|
|
415
|
+
//# sourceMappingURL=array.d.ts.map
|