@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,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ruby's core `Comparable` module (`vendor/ruby/v3.3.11/compar.c:313`
|
|
3
|
+
* `Init_Comparable`) and the `<=>` send its members derive from. JS has no
|
|
4
|
+
* `<=>` and no module to include, so both halves live here: {@link cmp} is the
|
|
5
|
+
* send, and the derived operators are `this`-typed functions a class assigns to
|
|
6
|
+
* itself (CLAUDE.md "Module mixins"), which is the settled idiom for a module
|
|
7
|
+
* whose members need a Ruby-shaped receiver rather than a bulk splice.
|
|
8
|
+
*
|
|
9
|
+
* The nullable return is the point: Ruby's `<=>` answers **nil** for an operand
|
|
10
|
+
* it cannot place, and a `cmp` typed `number` silently loses that arm. Every
|
|
11
|
+
* derived operator goes through {@link cmpint}, which turns that nil into
|
|
12
|
+
* `rb_cmperr`'s `ArgumentError`; `equals` is the one that does not raise.
|
|
13
|
+
*
|
|
14
|
+
* @boundary-file: a JS `Date` is compared as epoch millis, since Ruby's
|
|
15
|
+
* `Time#<=>` (`vendor/ruby/v3.3.11/time.c:3951` `time_cmp`) orders by the instant and
|
|
16
|
+
* JS `Date` carries no relational operators of its own.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The receiver of the mixin: a class that defines `<=>`, spelled `compareTo`
|
|
20
|
+
* here since `Comparable#==` already claims `equals`.
|
|
21
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` (`vendor/ruby/v3.3.11/compar.c:315`).
|
|
22
|
+
*/
|
|
23
|
+
export interface Comparable {
|
|
24
|
+
compareTo(other: unknown): number | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Ruby's `a <=> b` over the values trails carries: the receiver's own `<=>`
|
|
28
|
+
* when it has one, and otherwise the relational reading `Integer#<=>`,
|
|
29
|
+
* `Float#<=>` and `String#<=>` each define, falling back to the inherited
|
|
30
|
+
* `Object#<=>` (`vendor/ruby/v3.3.11/object.c:1665` `rb_obj_cmp`) for everything else.
|
|
31
|
+
* `nil` for an operand it cannot place, which includes `Float::NAN`, a
|
|
32
|
+
* cross-type operand, and `rb_obj_cmp`'s unequal arm.
|
|
33
|
+
*
|
|
34
|
+
* @boundary: a Temporal value carrying an instant is trails' seat for a Ruby
|
|
35
|
+
* `Time`, whose `<=>` (`vendor/ruby/v3.3.11/time.c:3951` `time_cmp`) orders by that
|
|
36
|
+
* instant, so it is ordered on `epochNanoseconds` — reached through
|
|
37
|
+
* {@link rbObjClassname}'s `Time` arm, which seats that reading, rather than
|
|
38
|
+
* through `@blazetrails/date`, which this package does not depend on. The receiver's
|
|
39
|
+
* own `<=>` still wins, as it does in Ruby. A Temporal value carrying no
|
|
40
|
+
* instant still reaches `rb_obj_cmp`;
|
|
41
|
+
* `calculations.ts`'s `compare` — the one caller that orders those — hands
|
|
42
|
+
* over each side's epoch reading instead, and a pair of plain Temporal values
|
|
43
|
+
* of the same shape is ordered by that shape's own `compare`, after a
|
|
44
|
+
* `PlainDate` is widened to its `PlainDateTime`: Ruby's `cmp_dd`
|
|
45
|
+
* (`date_core.c:6707-6761`) places a day against an instant on the same axis,
|
|
46
|
+
* which is what makes `Date.new(2002,3,19) == DateTime.new(2002,3,19, 0,0,0)`
|
|
47
|
+
* true.
|
|
48
|
+
*
|
|
49
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` — the `<=>` send it is defined over
|
|
50
|
+
* (`vendor/ruby/v3.3.11/compar.c:315`), which Rails inherits rather than defines.
|
|
51
|
+
*/
|
|
52
|
+
export declare function cmp(a: unknown, b: unknown): number | null;
|
|
53
|
+
/**
|
|
54
|
+
* Ruby's `rb_cmpint` (`vendor/ruby/v3.3.11/bignum.c:2959`), which turns a `<=>` result
|
|
55
|
+
* into a C int and sends a `nil` one to `rb_cmperr` — the free-function form
|
|
56
|
+
* `Array#max` reaches through `OPTIMIZED_CMP`, where {@link cmpint} is the
|
|
57
|
+
* `Comparable` method form.
|
|
58
|
+
* @noRailsEquivalent PERMANENT — Ruby core `rb_cmpint` (`vendor/ruby/v3.3.11/bignum.c:2959`).
|
|
59
|
+
*/
|
|
60
|
+
export declare function rbCmpint(val: number | null | undefined, a: unknown, b: unknown): number;
|
|
61
|
+
/**
|
|
62
|
+
* Ruby's `cmpint` (`vendor/ruby/v3.3.11/compar.c:91`), the one body every operator
|
|
63
|
+
* below is derived from: a `nil` `<=>` is an `ArgumentError`, not a `false`.
|
|
64
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmpint` (`vendor/ruby/v3.3.11/compar.c:91`).
|
|
65
|
+
*/
|
|
66
|
+
export declare function cmpint(this: Comparable, other: unknown): number;
|
|
67
|
+
/**
|
|
68
|
+
* Ruby `Comparable#<` (`vendor/ruby/v3.3.11/compar.c:133` `cmp_lt`).
|
|
69
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_lt` (`vendor/ruby/v3.3.11/compar.c:133`).
|
|
70
|
+
*/
|
|
71
|
+
export declare function lessThan(this: Comparable, other: unknown): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Ruby `Comparable#<=` (`vendor/ruby/v3.3.11/compar.c:147` `cmp_le`).
|
|
74
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_le` (`vendor/ruby/v3.3.11/compar.c:147`).
|
|
75
|
+
*/
|
|
76
|
+
export declare function lessThanOrEqual(this: Comparable, other: unknown): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Ruby `Comparable#>` (`vendor/ruby/v3.3.11/compar.c:105` `cmp_gt`).
|
|
79
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_gt` (`vendor/ruby/v3.3.11/compar.c:105`).
|
|
80
|
+
*/
|
|
81
|
+
export declare function greaterThan(this: Comparable, other: unknown): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Ruby `Comparable#>=` (`vendor/ruby/v3.3.11/compar.c:119` `cmp_ge`).
|
|
84
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_ge` (`vendor/ruby/v3.3.11/compar.c:119`).
|
|
85
|
+
*/
|
|
86
|
+
export declare function greaterThanOrEqual(this: Comparable, other: unknown): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Ruby `Comparable#==` (`vendor/ruby/v3.3.11/compar.c:79` `cmp_equal`), the one derived
|
|
89
|
+
* operator that does NOT raise: a `nil` `<=>` is `false`, and an identical
|
|
90
|
+
* object is `true` before `<=>` is sent at all.
|
|
91
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_equal` (`vendor/ruby/v3.3.11/compar.c:79`).
|
|
92
|
+
*/
|
|
93
|
+
export declare function equals(this: Comparable, other: unknown): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Ruby `Comparable#between?` (`vendor/ruby/v3.3.11/compar.c:168` `cmp_between`), which
|
|
96
|
+
* is `cmpint` on both ends and so raises for an operand `<=>` cannot place.
|
|
97
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_between` (`vendor/ruby/v3.3.11/compar.c:168`).
|
|
98
|
+
*/
|
|
99
|
+
export declare function isBetween(this: Comparable, min: unknown, max: unknown): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Ruby `Array#max` (`vendor/ruby/v3.3.11/array.c:5848` `rb_ary_max`), the
|
|
102
|
+
* no-argument arms. Without a block: `nil` for an empty array, and otherwise
|
|
103
|
+
* the first element carried through `ary_max_generic`
|
|
104
|
+
* (`vendor/ruby/v3.3.11/array.c:5719`). MRI's `CMP_OPTIMIZABLE` fast paths for a
|
|
105
|
+
* Fixnum / String / Float first element are omitted — each one falls back to
|
|
106
|
+
* `ary_max_generic` the moment an element is not of that type, so they change
|
|
107
|
+
* speed, not the answer. With a block: the element the block's `<=>` answer
|
|
108
|
+
* ranks highest, the first of any tie (`vendor/ruby/v3.3.11/array.c:5859-5866`).
|
|
109
|
+
*
|
|
110
|
+
* It lives beside {@link rbCmpint} rather than in an `array.ts` because that is
|
|
111
|
+
* the whole of it: `ary_max_generic` is `rb_cmpint(rb_cmp(vmax, v), vmax, v)`,
|
|
112
|
+
* so a `nil` reaching the comparison is an `ArgumentError`, not a skipped
|
|
113
|
+
* element.
|
|
114
|
+
*
|
|
115
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#max` (`vendor/ruby/v3.3.11/array.c:5848`).
|
|
116
|
+
*/
|
|
117
|
+
export declare function max<T>(ary: readonly T[], block?: (a: T, b: T) => number | null): T | null;
|
|
118
|
+
/**
|
|
119
|
+
* Ruby `Array#min` (`vendor/ruby/v3.3.11/array.c:6016` `rb_ary_min`), the no-argument,
|
|
120
|
+
* no-block arm — {@link max}'s mirror, carried through `ary_min_generic`
|
|
121
|
+
* (`vendor/ruby/v3.3.11/array.c:5888`), with the same `CMP_OPTIMIZABLE` fast paths
|
|
122
|
+
* omitted.
|
|
123
|
+
*
|
|
124
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#min` (`vendor/ruby/v3.3.11/array.c:6016`).
|
|
125
|
+
*/
|
|
126
|
+
export declare function min<T>(ary: readonly T[]): T | null;
|
|
127
|
+
//# sourceMappingURL=comparable.d.ts.map
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ruby's core `Comparable` module (`vendor/ruby/v3.3.11/compar.c:313`
|
|
3
|
+
* `Init_Comparable`) and the `<=>` send its members derive from. JS has no
|
|
4
|
+
* `<=>` and no module to include, so both halves live here: {@link cmp} is the
|
|
5
|
+
* send, and the derived operators are `this`-typed functions a class assigns to
|
|
6
|
+
* itself (CLAUDE.md "Module mixins"), which is the settled idiom for a module
|
|
7
|
+
* whose members need a Ruby-shaped receiver rather than a bulk splice.
|
|
8
|
+
*
|
|
9
|
+
* The nullable return is the point: Ruby's `<=>` answers **nil** for an operand
|
|
10
|
+
* it cannot place, and a `cmp` typed `number` silently loses that arm. Every
|
|
11
|
+
* derived operator goes through {@link cmpint}, which turns that nil into
|
|
12
|
+
* `rb_cmperr`'s `ArgumentError`; `equals` is the one that does not raise.
|
|
13
|
+
*
|
|
14
|
+
* @boundary-file: a JS `Date` is compared as epoch millis, since Ruby's
|
|
15
|
+
* `Time#<=>` (`vendor/ruby/v3.3.11/time.c:3951` `time_cmp`) orders by the instant and
|
|
16
|
+
* JS `Date` carries no relational operators of its own.
|
|
17
|
+
*/
|
|
18
|
+
import { ArgumentError } from "./argument-error.js";
|
|
19
|
+
import { rbCTime, rbInspect, rbObjClass, rbObjClassname, rbObjRespondTo, reopened, } from "./object.js";
|
|
20
|
+
import { kDateP, rbEqual } from "./rb-equal.js";
|
|
21
|
+
import { temporalTag, widenPlainDate } from "./temporal-tag.js";
|
|
22
|
+
import { rbStrCmp } from "./string/support.js";
|
|
23
|
+
/**
|
|
24
|
+
* Ruby's `a <=> b` over the values trails carries: the receiver's own `<=>`
|
|
25
|
+
* when it has one, and otherwise the relational reading `Integer#<=>`,
|
|
26
|
+
* `Float#<=>` and `String#<=>` each define, falling back to the inherited
|
|
27
|
+
* `Object#<=>` (`vendor/ruby/v3.3.11/object.c:1665` `rb_obj_cmp`) for everything else.
|
|
28
|
+
* `nil` for an operand it cannot place, which includes `Float::NAN`, a
|
|
29
|
+
* cross-type operand, and `rb_obj_cmp`'s unequal arm.
|
|
30
|
+
*
|
|
31
|
+
* @boundary: a Temporal value carrying an instant is trails' seat for a Ruby
|
|
32
|
+
* `Time`, whose `<=>` (`vendor/ruby/v3.3.11/time.c:3951` `time_cmp`) orders by that
|
|
33
|
+
* instant, so it is ordered on `epochNanoseconds` — reached through
|
|
34
|
+
* {@link rbObjClassname}'s `Time` arm, which seats that reading, rather than
|
|
35
|
+
* through `@blazetrails/date`, which this package does not depend on. The receiver's
|
|
36
|
+
* own `<=>` still wins, as it does in Ruby. A Temporal value carrying no
|
|
37
|
+
* instant still reaches `rb_obj_cmp`;
|
|
38
|
+
* `calculations.ts`'s `compare` — the one caller that orders those — hands
|
|
39
|
+
* over each side's epoch reading instead, and a pair of plain Temporal values
|
|
40
|
+
* of the same shape is ordered by that shape's own `compare`, after a
|
|
41
|
+
* `PlainDate` is widened to its `PlainDateTime`: Ruby's `cmp_dd`
|
|
42
|
+
* (`date_core.c:6707-6761`) places a day against an instant on the same axis,
|
|
43
|
+
* which is what makes `Date.new(2002,3,19) == DateTime.new(2002,3,19, 0,0,0)`
|
|
44
|
+
* true.
|
|
45
|
+
*
|
|
46
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` — the `<=>` send it is defined over
|
|
47
|
+
* (`vendor/ruby/v3.3.11/compar.c:315`), which Rails inherits rather than defines.
|
|
48
|
+
*/
|
|
49
|
+
export function cmp(a, b) {
|
|
50
|
+
if (a === null || a === undefined || b === null || b === undefined) {
|
|
51
|
+
return a === b ? 0 : null;
|
|
52
|
+
}
|
|
53
|
+
// `time_cmp`'s `rb_invcmp` arm (vendor/ruby/v3.3.11/time.c:3951): `-(other <=> time)`.
|
|
54
|
+
if (a instanceof Date && !(b instanceof Date) && isComparable(b)) {
|
|
55
|
+
const c = b.compareTo(a);
|
|
56
|
+
return c == null ? null : -c;
|
|
57
|
+
}
|
|
58
|
+
// boundary: Date endpoints are compared as epoch millis.
|
|
59
|
+
if (a instanceof Date)
|
|
60
|
+
a = a.getTime();
|
|
61
|
+
if (b instanceof Date)
|
|
62
|
+
b = b.getTime();
|
|
63
|
+
if (a instanceof Number)
|
|
64
|
+
a = a.valueOf();
|
|
65
|
+
if (b instanceof Number)
|
|
66
|
+
b = b.valueOf();
|
|
67
|
+
if (isComparable(a))
|
|
68
|
+
return a.compareTo(b) ?? null;
|
|
69
|
+
if (isCmpSpelling(a))
|
|
70
|
+
return a.cmp(b) ?? null;
|
|
71
|
+
if (rbObjClass(a) === reopened(rbCTime) && rbObjClass(b) === reopened(rbCTime)) {
|
|
72
|
+
if (typeof a.compare === "function") {
|
|
73
|
+
return a.compare(b) ?? null;
|
|
74
|
+
}
|
|
75
|
+
const x = a.epochNanoseconds;
|
|
76
|
+
const y = b.epochNanoseconds;
|
|
77
|
+
if (x !== undefined && y !== undefined)
|
|
78
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
79
|
+
}
|
|
80
|
+
// `time_cmp`'s `rb_invcmp` arm (vendor/ruby/v3.3.11/time.c:3951) for a non-Time `other`.
|
|
81
|
+
if (rbObjClass(a) === reopened(rbCTime) &&
|
|
82
|
+
rbObjClass(b) !== reopened(rbCTime) &&
|
|
83
|
+
(isComparable(b) || isCmpSpelling(b))) {
|
|
84
|
+
const c = isComparable(b) ? b.compareTo(a) : b.cmp(a);
|
|
85
|
+
return c == null ? null : -c;
|
|
86
|
+
}
|
|
87
|
+
if (kTemporalDateP(a) && (typeof b === "number" || typeof b === "bigint")) {
|
|
88
|
+
const ajd = mAjd(a);
|
|
89
|
+
const n = Number(b);
|
|
90
|
+
if (Number.isNaN(n))
|
|
91
|
+
return null;
|
|
92
|
+
return ajd < n ? -1 : ajd > n ? 1 : 0;
|
|
93
|
+
}
|
|
94
|
+
if (temporalTag(a) !== null && temporalTag(b) === null) {
|
|
95
|
+
if (kDateP(a) && kDateP(b) && isCmpSpelling(b)) {
|
|
96
|
+
const c = b.cmp(a);
|
|
97
|
+
return c == null ? null : c === 0 ? 0 : -c;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (temporalTag(a) !== null && temporalTag(b) !== null) {
|
|
101
|
+
const x = widenPlainDate(a);
|
|
102
|
+
const y = widenPlainDate(b);
|
|
103
|
+
if (temporalTag(x) === temporalTag(y)) {
|
|
104
|
+
return x.constructor.compare(x, y);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (typeof a === "number" || typeof a === "bigint") {
|
|
108
|
+
/* `rb_int_cmp` (`vendor/ruby/v3.3.11/numeric.c:4696`) and `flo_cmp`
|
|
109
|
+
(`vendor/ruby/v3.3.11/numeric.c:1700`) answer nil for a non-Numeric, and for NaN. */
|
|
110
|
+
if (Number.isNaN(a))
|
|
111
|
+
return null;
|
|
112
|
+
if (typeof b !== "number" && typeof b !== "bigint") {
|
|
113
|
+
if (typeof a === "number" && !Number.isFinite(a)) {
|
|
114
|
+
const i = kTemporalDateP(b)
|
|
115
|
+
? false
|
|
116
|
+
: rbObjRespondTo(b, "isInfinite")
|
|
117
|
+
? b.isInfinite()
|
|
118
|
+
: undefined;
|
|
119
|
+
if (i !== undefined) {
|
|
120
|
+
if (i != null && i !== false) {
|
|
121
|
+
const j = rbCmpint(i, a, b);
|
|
122
|
+
return a > 0 ? (j > 0 ? 0 : 1) : j < 0 ? 0 : -1;
|
|
123
|
+
}
|
|
124
|
+
return a > 0 ? 1 : -1;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/* `rb_num_coerce_cmp` (`vendor/ruby/v3.3.11/numeric.c:484`) over
|
|
128
|
+
`do_coerce` (`:455`): an operand answering `coerce` is sent it, and
|
|
129
|
+
the pair it returns is compared. */
|
|
130
|
+
if (rbObjRespondTo(b, "coerce")) {
|
|
131
|
+
const ary = b.coerce(a);
|
|
132
|
+
if (ary === null || ary === undefined)
|
|
133
|
+
return null;
|
|
134
|
+
if (!Array.isArray(ary) || ary.length !== 2) {
|
|
135
|
+
throw new TypeError("coerce must return [x, y]");
|
|
136
|
+
}
|
|
137
|
+
return cmp(ary[0], ary[1]);
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
if (Number.isNaN(b))
|
|
142
|
+
return null;
|
|
143
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
144
|
+
}
|
|
145
|
+
if (typeof a === "string") {
|
|
146
|
+
/* `rb_str_cmp_m` (`vendor/ruby/v3.3.11/string.c:3803`): `rb_check_string_type`
|
|
147
|
+
converts an operand answering `to_str`, and anything else goes to
|
|
148
|
+
`rb_invcmp` (`compar.c:43`), the negated reverse `<=>`. */
|
|
149
|
+
const s = typeof b === "string"
|
|
150
|
+
? b
|
|
151
|
+
: rbObjRespondTo(b, "toStr")
|
|
152
|
+
? b.toStr()
|
|
153
|
+
: null;
|
|
154
|
+
if (s === null) {
|
|
155
|
+
const inv = cmp(b, a);
|
|
156
|
+
return inv === null ? null : -inv;
|
|
157
|
+
}
|
|
158
|
+
return rbStrCmp(a, s);
|
|
159
|
+
}
|
|
160
|
+
if (Array.isArray(a)) {
|
|
161
|
+
/* `rb_ary_cmp` (`vendor/ruby/v3.3.11/array.c:5303`) and its `recursive_cmp`
|
|
162
|
+
(`:5252`): the first element pair whose `<=>` is not `0` decides, a nil
|
|
163
|
+
one included, and a common prefix is ordered by length. */
|
|
164
|
+
if (!Array.isArray(b))
|
|
165
|
+
return null;
|
|
166
|
+
if (a === b)
|
|
167
|
+
return 0;
|
|
168
|
+
const len = Math.min(a.length, b.length);
|
|
169
|
+
for (let i = 0; i < len; i++) {
|
|
170
|
+
const v = cmp(a[i], b[i]);
|
|
171
|
+
if (v !== 0)
|
|
172
|
+
return v;
|
|
173
|
+
}
|
|
174
|
+
const d = a.length - b.length;
|
|
175
|
+
if (d === 0)
|
|
176
|
+
return 0;
|
|
177
|
+
if (d > 0)
|
|
178
|
+
return 1;
|
|
179
|
+
return -1;
|
|
180
|
+
}
|
|
181
|
+
/* `vendor/ruby/v3.3.11/object.c:1665` `rb_obj_cmp` — the inherited `<=>`: `0` for an
|
|
182
|
+
`==` operand and nil otherwise, rather than JS relational coercion, which
|
|
183
|
+
orders `false` before `true` where Ruby answers nil. */
|
|
184
|
+
return rbEqual(a, b) ? 0 : null;
|
|
185
|
+
}
|
|
186
|
+
function kTemporalDateP(value) {
|
|
187
|
+
const tag = temporalTag(value);
|
|
188
|
+
return tag === "Temporal.PlainDate" || tag === "Temporal.PlainDateTime";
|
|
189
|
+
}
|
|
190
|
+
function mAjd(value) {
|
|
191
|
+
const v = value;
|
|
192
|
+
const y = v.month <= 2 ? v.year - 1 : v.year;
|
|
193
|
+
const era = Math.floor(y / 400);
|
|
194
|
+
const yoe = y - era * 400;
|
|
195
|
+
const doy = Math.floor((153 * (v.month + (v.month > 2 ? -3 : 9)) + 2) / 5) + v.day - 1;
|
|
196
|
+
const doe = yoe * 365 + Math.floor(yoe / 4) - Math.floor(yoe / 100) + doy;
|
|
197
|
+
const epochDays = era * 146097 + doe - 719468;
|
|
198
|
+
const seconds = (v.hour ?? 0) * 3600 +
|
|
199
|
+
(v.minute ?? 0) * 60 +
|
|
200
|
+
(v.second ?? 0) +
|
|
201
|
+
(v.millisecond ?? 0) / 1e3 +
|
|
202
|
+
(v.microsecond ?? 0) / 1e6 +
|
|
203
|
+
(v.nanosecond ?? 0) / 1e9;
|
|
204
|
+
return epochDays + 2440587.5 + seconds / 86400;
|
|
205
|
+
}
|
|
206
|
+
function isComparable(value) {
|
|
207
|
+
return typeof value.compareTo === "function";
|
|
208
|
+
}
|
|
209
|
+
function isCmpSpelling(value) {
|
|
210
|
+
return typeof value.cmp === "function";
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Ruby's `rb_cmperr` (`vendor/ruby/v3.3.11/compar.c:28`), which names the operand by
|
|
214
|
+
* `inspect` for a special constant or a Float and by `rb_obj_class` otherwise. */
|
|
215
|
+
function rbCmperr(x, y) {
|
|
216
|
+
const classname = specialConstP(y) ? rbInspect(y) : rbObjClassname(y);
|
|
217
|
+
throw new ArgumentError(`comparison of ${rbObjClassname(x)} with ${classname} failed`);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* `SPECIAL_CONST_P` (`vendor/ruby/v3.3.11/include/ruby/internal/special_consts.h`) plus
|
|
221
|
+
* `rb_cmperr`'s `BUILTIN_TYPE(y) == T_FLOAT` arm: nil, true, false, a Symbol, a
|
|
222
|
+
* Float, and a Fixnum — an Integer up to `RUBY_FIXNUM_MAX`
|
|
223
|
+
* (`vendor/ruby/v3.3.11/include/ruby/internal/arithmetic/fixnum.h:55`, `LONG_MAX / 2`).
|
|
224
|
+
* A Bignum is a heap object, so `rb_cmperr` names it by class.
|
|
225
|
+
*/
|
|
226
|
+
function specialConstP(y) {
|
|
227
|
+
if (typeof y === "bigint")
|
|
228
|
+
return y <= 4611686018427387903n && y >= -4611686018427387904n;
|
|
229
|
+
return y === null || y === undefined || typeof y === "boolean" || typeof y === "number";
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Ruby's `rb_cmpint` (`vendor/ruby/v3.3.11/bignum.c:2959`), which turns a `<=>` result
|
|
233
|
+
* into a C int and sends a `nil` one to `rb_cmperr` — the free-function form
|
|
234
|
+
* `Array#max` reaches through `OPTIMIZED_CMP`, where {@link cmpint} is the
|
|
235
|
+
* `Comparable` method form.
|
|
236
|
+
* @noRailsEquivalent PERMANENT — Ruby core `rb_cmpint` (`vendor/ruby/v3.3.11/bignum.c:2959`).
|
|
237
|
+
*/
|
|
238
|
+
export function rbCmpint(val, a, b) {
|
|
239
|
+
if (val === null || val === undefined)
|
|
240
|
+
rbCmperr(a, b);
|
|
241
|
+
if (val > 0)
|
|
242
|
+
return 1;
|
|
243
|
+
if (val < 0)
|
|
244
|
+
return -1;
|
|
245
|
+
return 0;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Ruby's `cmpint` (`vendor/ruby/v3.3.11/compar.c:91`), the one body every operator
|
|
249
|
+
* below is derived from: a `nil` `<=>` is an `ArgumentError`, not a `false`.
|
|
250
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmpint` (`vendor/ruby/v3.3.11/compar.c:91`).
|
|
251
|
+
*/
|
|
252
|
+
export function cmpint(other) {
|
|
253
|
+
return rbCmpint(cmp(this, other), this, other);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Ruby `Comparable#<` (`vendor/ruby/v3.3.11/compar.c:133` `cmp_lt`).
|
|
257
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_lt` (`vendor/ruby/v3.3.11/compar.c:133`).
|
|
258
|
+
*/
|
|
259
|
+
export function lessThan(other) {
|
|
260
|
+
return cmpint.call(this, other) < 0;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Ruby `Comparable#<=` (`vendor/ruby/v3.3.11/compar.c:147` `cmp_le`).
|
|
264
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_le` (`vendor/ruby/v3.3.11/compar.c:147`).
|
|
265
|
+
*/
|
|
266
|
+
export function lessThanOrEqual(other) {
|
|
267
|
+
return cmpint.call(this, other) <= 0;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Ruby `Comparable#>` (`vendor/ruby/v3.3.11/compar.c:105` `cmp_gt`).
|
|
271
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_gt` (`vendor/ruby/v3.3.11/compar.c:105`).
|
|
272
|
+
*/
|
|
273
|
+
export function greaterThan(other) {
|
|
274
|
+
return cmpint.call(this, other) > 0;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Ruby `Comparable#>=` (`vendor/ruby/v3.3.11/compar.c:119` `cmp_ge`).
|
|
278
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_ge` (`vendor/ruby/v3.3.11/compar.c:119`).
|
|
279
|
+
*/
|
|
280
|
+
export function greaterThanOrEqual(other) {
|
|
281
|
+
return cmpint.call(this, other) >= 0;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Ruby `Comparable#==` (`vendor/ruby/v3.3.11/compar.c:79` `cmp_equal`), the one derived
|
|
285
|
+
* operator that does NOT raise: a `nil` `<=>` is `false`, and an identical
|
|
286
|
+
* object is `true` before `<=>` is sent at all.
|
|
287
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_equal` (`vendor/ruby/v3.3.11/compar.c:79`).
|
|
288
|
+
*/
|
|
289
|
+
export function equals(other) {
|
|
290
|
+
if (this === other)
|
|
291
|
+
return true;
|
|
292
|
+
const c = this.compareTo(other);
|
|
293
|
+
if (c === null || c === undefined)
|
|
294
|
+
return false;
|
|
295
|
+
return c === 0;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Ruby `Comparable#between?` (`vendor/ruby/v3.3.11/compar.c:168` `cmp_between`), which
|
|
299
|
+
* is `cmpint` on both ends and so raises for an operand `<=>` cannot place.
|
|
300
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Comparable` `cmp_between` (`vendor/ruby/v3.3.11/compar.c:168`).
|
|
301
|
+
*/
|
|
302
|
+
export function isBetween(min, max) {
|
|
303
|
+
return cmpint.call(this, min) >= 0 && cmpint.call(this, max) <= 0;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Ruby `Array#max` (`vendor/ruby/v3.3.11/array.c:5848` `rb_ary_max`), the
|
|
307
|
+
* no-argument arms. Without a block: `nil` for an empty array, and otherwise
|
|
308
|
+
* the first element carried through `ary_max_generic`
|
|
309
|
+
* (`vendor/ruby/v3.3.11/array.c:5719`). MRI's `CMP_OPTIMIZABLE` fast paths for a
|
|
310
|
+
* Fixnum / String / Float first element are omitted — each one falls back to
|
|
311
|
+
* `ary_max_generic` the moment an element is not of that type, so they change
|
|
312
|
+
* speed, not the answer. With a block: the element the block's `<=>` answer
|
|
313
|
+
* ranks highest, the first of any tie (`vendor/ruby/v3.3.11/array.c:5859-5866`).
|
|
314
|
+
*
|
|
315
|
+
* It lives beside {@link rbCmpint} rather than in an `array.ts` because that is
|
|
316
|
+
* the whole of it: `ary_max_generic` is `rb_cmpint(rb_cmp(vmax, v), vmax, v)`,
|
|
317
|
+
* so a `nil` reaching the comparison is an `ArgumentError`, not a skipped
|
|
318
|
+
* element.
|
|
319
|
+
*
|
|
320
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#max` (`vendor/ruby/v3.3.11/array.c:5848`).
|
|
321
|
+
*/
|
|
322
|
+
export function max(ary, block) {
|
|
323
|
+
const n = ary.length;
|
|
324
|
+
if (block) {
|
|
325
|
+
let result = null;
|
|
326
|
+
for (let i = 0; i < ary.length; i++) {
|
|
327
|
+
const v = ary[i];
|
|
328
|
+
if (i === 0 || rbCmpint(block(v, result), v, result) > 0) {
|
|
329
|
+
result = v;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
return result;
|
|
333
|
+
}
|
|
334
|
+
if (n === 0)
|
|
335
|
+
return null;
|
|
336
|
+
const result = ary[0];
|
|
337
|
+
if (n > 1)
|
|
338
|
+
return aryMaxGeneric(ary, 1, result);
|
|
339
|
+
return result;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Ruby `Array#min` (`vendor/ruby/v3.3.11/array.c:6016` `rb_ary_min`), the no-argument,
|
|
343
|
+
* no-block arm — {@link max}'s mirror, carried through `ary_min_generic`
|
|
344
|
+
* (`vendor/ruby/v3.3.11/array.c:5888`), with the same `CMP_OPTIMIZABLE` fast paths
|
|
345
|
+
* omitted.
|
|
346
|
+
*
|
|
347
|
+
* @noRailsEquivalent PERMANENT — Ruby core `Array#min` (`vendor/ruby/v3.3.11/array.c:6016`).
|
|
348
|
+
*/
|
|
349
|
+
export function min(ary) {
|
|
350
|
+
const n = ary.length;
|
|
351
|
+
if (n === 0)
|
|
352
|
+
return null;
|
|
353
|
+
const result = ary[0];
|
|
354
|
+
if (n > 1)
|
|
355
|
+
return aryMinGeneric(ary, 1, result);
|
|
356
|
+
return result;
|
|
357
|
+
}
|
|
358
|
+
function aryMinGeneric(ary, i, vmin) {
|
|
359
|
+
for (; i < ary.length; ++i) {
|
|
360
|
+
const v = ary[i];
|
|
361
|
+
if (rbCmpint(cmp(vmin, v), vmin, v) > 0) {
|
|
362
|
+
vmin = v;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return vmin;
|
|
366
|
+
}
|
|
367
|
+
function aryMaxGeneric(ary, i, vmax) {
|
|
368
|
+
for (; i < ary.length; ++i) {
|
|
369
|
+
const v = ary[i];
|
|
370
|
+
if (rbCmpint(cmp(vmax, v), vmax, v) < 0) {
|
|
371
|
+
vmax = v;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return vmax;
|
|
375
|
+
}
|
|
376
|
+
//# sourceMappingURL=comparable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comparable.js","sourceRoot":"","sources":["../lib/comparable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,cAAc,EACd,cAAc,EACd,QAAQ,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,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CAAC;AAED,SAAS,aAAa,CAAI,GAAiB,EAAE,CAAS,EAAE,IAAO;IAC7D,OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,IAAI,GAAG,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { rbCNumeric } from "./numeric-class.js";
|
|
2
|
+
/**
|
|
3
|
+
* `rb_cComplex` (`vendor/ruby/v3.3.11/complex.c:2529`).
|
|
4
|
+
*
|
|
5
|
+
* @noRailsEquivalent PERMANENT — Ruby core. Rails defines no Complex; its
|
|
6
|
+
* `Enumerable#sum` tests (`core_ext/enumerable_test.rb:112-115`) sum one.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Complex extends rbCNumeric {
|
|
9
|
+
/** `Complex#real` (`vendor/ruby/v3.3.11/complex.c:771` `rb_complex_real`).
|
|
10
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
11
|
+
readonly real: unknown;
|
|
12
|
+
/** `Complex#imaginary` (`vendor/ruby/v3.3.11/complex.c:794` `rb_complex_imag`).
|
|
13
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
14
|
+
readonly imaginary: unknown;
|
|
15
|
+
/** `Complex::I` (`vendor/ruby/v3.3.11/complex.c:2638`).
|
|
16
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
17
|
+
static readonly I: Complex;
|
|
18
|
+
/** `nucomp_s_new_internal` (`vendor/ruby/v3.3.11/complex.c:393`).
|
|
19
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
20
|
+
constructor(
|
|
21
|
+
/** `Complex#real` (`vendor/ruby/v3.3.11/complex.c:771` `rb_complex_real`).
|
|
22
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
23
|
+
real: unknown,
|
|
24
|
+
/** `Complex#imaginary` (`vendor/ruby/v3.3.11/complex.c:794` `rb_complex_imag`).
|
|
25
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
26
|
+
imaginary: unknown);
|
|
27
|
+
/** `Complex#imag` (`vendor/ruby/v3.3.11/complex.c:2557`).
|
|
28
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
29
|
+
get imag(): unknown;
|
|
30
|
+
/** `rb_complex_plus` (`vendor/ruby/v3.3.11/complex.c:832`, `Complex#+`).
|
|
31
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
32
|
+
plus(other: unknown): unknown;
|
|
33
|
+
/** `rb_complex_mul` (`vendor/ruby/v3.3.11/complex.c:928`, `Complex#*`), for the real
|
|
34
|
+
* multiplier this port needs.
|
|
35
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
36
|
+
multiply(other: unknown): Complex;
|
|
37
|
+
/** `nucomp_eqeq_p` (`vendor/ruby/v3.3.11/complex.c:1225`, `Complex#==`).
|
|
38
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
39
|
+
equals(other: unknown): boolean;
|
|
40
|
+
/** `nucomp_coerce` (`vendor/ruby/v3.3.11/complex.c:1300`, `Complex#coerce`).
|
|
41
|
+
* @noRailsEquivalent PERMANENT — Ruby core, part of the Complex above. */
|
|
42
|
+
coerce(other: unknown): [unknown, unknown];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `Kernel#Complex()` (`vendor/ruby/v3.3.11/complex.c:2359` `nucomp_s_convert`).
|
|
46
|
+
* @noRailsEquivalent PERMANENT
|
|
47
|
+
*/
|
|
48
|
+
export declare function complex(a1: unknown, a2?: unknown): Complex;
|
|
49
|
+
//# sourceMappingURL=complex.d.ts.map
|