@glutinum/cli 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/dist/Glutinum.Converter/Abbreviations.js +246 -0
- package/dist/Glutinum.Converter/FsharpAST.js +87 -28
- package/dist/Glutinum.Converter/Generate.js +55 -8
- package/dist/Glutinum.Converter/GlueAST.js +333 -34
- package/dist/Glutinum.Converter/Log.js +7 -8
- package/dist/Glutinum.Converter/Merge.js +683 -31
- package/dist/Glutinum.Converter/Packages.js +308 -0
- package/dist/Glutinum.Converter/Printer.js +323 -186
- package/dist/Glutinum.Converter/Read.js +279 -6
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +13 -7
- package/dist/Glutinum.Converter/Reader/Declaration.js +102 -17
- package/dist/Glutinum.Converter/Reader/Documentation.js +168 -73
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +7 -51
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +64 -15
- package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +165 -0
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +30 -5
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +122 -4
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +83 -7
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +8 -8
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +11 -9
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +3 -2
- package/dist/Glutinum.Converter/Reader/Node.js +24 -10
- package/dist/Glutinum.Converter/Reader/Parameters.js +110 -7
- package/dist/Glutinum.Converter/Reader/Report.js +31 -12
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +4 -3
- package/dist/Glutinum.Converter/Reader/TypeNode.js +1524 -253
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +75 -20
- package/dist/Glutinum.Converter/Reader/TypeParameters.js +8 -5
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +184 -50
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +32 -13
- package/dist/Glutinum.Converter/Reader/Types.js +180 -0
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +99 -43
- package/dist/Glutinum.Converter/Reader/Utils.js +1143 -55
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +59 -14
- package/dist/Glutinum.Converter/Transform.js +8292 -1119
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +3 -3
- package/dist/Glutinum.Converter/TypeScript.js +3 -3
- package/dist/Glutinum.Converter/Utils/Keywords.js +6 -6
- package/dist/Glutinum.Converter/Utils/List.js +3 -3
- package/dist/Glutinum.Converter/Utils/Naming.js +61 -12
- package/dist/Glutinum.Converter/Utils/String.js +7 -3
- package/dist/Program.js +230 -72
- package/dist/fable_modules/Fable.Promise.3.2.1/AsyncIterable.fs +89 -0
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/AsyncIterable.fs.js +29 -29
- package/dist/fable_modules/Fable.Promise.3.2.1/Fable.Promise.fableproj +25 -0
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs +842 -766
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs.js +26 -12
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs +31 -31
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs.js +5 -5
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs +235 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs.js +384 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AssemblyInfo.fs +4 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs +89 -9
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs.js +13 -12
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOption.fs +50 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs +30 -39
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs.js +10 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResult.fs +52 -8
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs +26 -42
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOption.fs +17 -5
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultOption.fs.js +26 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs +31 -33
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidation.fs +1 -6
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs +10 -18
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs.js +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/FsToolkit.ErrorHandling.fableproj +69 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs +68 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs.js +47 -41
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Nullness.fs +81 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Option.fs +133 -2
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs +139 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs.js +48 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/OptionOp.fs +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs +88 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs.js +30 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs +200 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidation.fs +34 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs +244 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs.js +18 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs +87 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs.js +8 -8
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs +8 -23
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs.js +5 -5
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs +1 -1
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs.js +10 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs +7 -18
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs.js +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs +503 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs.js +295 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Validation.fs +0 -5
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs +7 -13
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValueOption.fs +1 -4
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOption.fs +102 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionCE.fs +587 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionOp.fs +10 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1 → FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0}/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Array.js +192 -86
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Async.js +58 -53
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/AsyncBuilder.js +29 -8
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BigInt.js +71 -46
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BitConverter.js +2 -2
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Boolean.js +4 -3
- package/dist/fable_modules/fable-library-js.5.17.2/CHANGELOG.md +348 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Char.js +64 -31
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Choice.js +2 -2
- package/dist/fable_modules/fable-library-js.5.17.2/CollectionUtil.js +182 -0
- package/dist/fable_modules/fable-library-js.5.17.2/ConditionalWeakTable.js +21 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Date.js +197 -112
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOffset.js +46 -62
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOnly.js +6 -6
- package/dist/fable_modules/fable-library-js.5.17.2/DateOnlyTemporal.js +146 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeFormat.js +523 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeOffsetTemporal.js +283 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeTemporal.js +243 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Decimal.js +39 -13
- package/dist/fable_modules/fable-library-js.5.17.2/Directory.js +11 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Double.js +10 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Encoding.js +20 -8
- package/dist/fable_modules/fable-library-js.5.17.2/Environment.js +3 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Event.js +10 -1
- package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Collections.js +45 -0
- package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Core.js +156 -0
- package/dist/fable_modules/fable-library-js.5.17.2/File.js +27 -0
- package/dist/fable_modules/fable-library-js.5.17.2/Global.js +29 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Guid.js +33 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Int32.js +17 -17
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/List.js +170 -106
- package/dist/fable_modules/fable-library-js.5.17.2/Long.js +38 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MailboxProcessor.js +13 -6
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Map.js +65 -61
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MapUtil.js +22 -4
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableMap.js +28 -16
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableSet.js +7 -7
- package/dist/fable_modules/fable-library-js.5.17.2/Native.js +14 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Numeric.js +44 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Observable.js +5 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Option.js +11 -20
- package/dist/fable_modules/fable-library-js.5.17.2/Path.js +31 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Random.js +22 -20
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Range.js +12 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Reflection.js +50 -22
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/RegExp.js +68 -30
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Result.js +6 -6
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq.js +229 -104
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq2.js +1 -1
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Set.js +153 -113
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/String.js +238 -50
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Collections.Generic.js +30 -14
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Text.js +69 -31
- package/dist/fable_modules/fable-library-js.5.17.2/System.js +289 -0
- package/dist/fable_modules/fable-library-js.5.17.2/Task.js +27 -0
- package/dist/fable_modules/fable-library-js.5.17.2/TaskBuilder.js +72 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeOnly.js +6 -6
- package/dist/fable_modules/fable-library-js.5.17.2/TimeOnlyTemporal.js +142 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeSpan.js +18 -15
- package/dist/fable_modules/fable-library-js.5.17.2/TimeSpanTemporal.js +259 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Types.js +14 -24
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Uri.js +44 -21
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Util.js +49 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/lib/big.js +14 -11
- package/dist/fable_modules/fable-library-js.5.17.2/package.json +24 -0
- package/dist/fable_modules/fable-library-js.5.17.2/quotation.js +682 -0
- package/package.json +4 -4
- package/src/Glutinum.Converter/js/bootstrap.js +109 -2
- package/src/Glutinum.Converter/js/host.js +144 -0
- package/src/Glutinum.Converter/js/npm.js +137 -0
- package/src/Glutinum.Converter/js/resolve.js +402 -0
- package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
- package/dist/Glutinum.Converter/Generate.js.map +0 -1
- package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
- package/dist/Glutinum.Converter/Log.js.map +0 -1
- package/dist/Glutinum.Converter/Merge.js.map +0 -1
- package/dist/Glutinum.Converter/Printer.js.map +0 -1
- package/dist/Glutinum.Converter/Read.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
- package/dist/Glutinum.Converter/Transform.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
- package/dist/Program.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
- package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
- package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
- package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
- package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
- package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
- package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
- package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
- package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
- package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
- package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
- package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
- package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
- package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
- package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
- package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
- package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
- package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
- package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
- package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
- package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
- package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
- package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
- package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
- package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
- package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
- package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
- package/dist/fable_modules/project_cracked.json +0 -1
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/FSharp.Core.CompilerServices.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/README.md +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Timer.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Unicode.13.0.0.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/big.d.ts +0 -0
package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableMap.js
RENAMED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { disposeSafe, defaultOf, equals, toIterator, getEnumerator } from "./Util.js";
|
|
2
2
|
import { iterate, map, delay, toArray, iterateIndexed, concat } from "./Seq.js";
|
|
3
3
|
import { value as value_1 } from "./Option.js";
|
|
4
|
-
import { setItem } from "./Array.js";
|
|
4
|
+
import { item as item_1, setItem } from "./Array.js";
|
|
5
5
|
import { FSharpRef } from "./Types.js";
|
|
6
6
|
import { class_type } from "./Reflection.js";
|
|
7
7
|
import { getItemFromDict, tryGetValue } from "./MapUtil.js";
|
|
8
|
+
import { KeyNotFoundException_$ctor_Z721C83C5 } from "./System.Collections.Generic.js";
|
|
9
|
+
import { ArgumentException_$ctor_Z721C83C5 } from "./System.js";
|
|
8
10
|
import { format } from "./String.js";
|
|
9
11
|
export class Dictionary {
|
|
10
12
|
constructor(pairs, comparer) {
|
|
@@ -53,11 +55,11 @@ export class Dictionary {
|
|
|
53
55
|
"System.Collections.Generic.ICollection`1.Contains2B595"(item) {
|
|
54
56
|
const this$ = this;
|
|
55
57
|
const matchValue = Dictionary__TryFind_2B595(this$, item[0]);
|
|
56
|
-
let matchResult,
|
|
58
|
+
let matchResult = undefined, pair_1 = undefined;
|
|
57
59
|
if (matchValue != null) {
|
|
58
60
|
if (equals(value_1(matchValue)[1], item[1])) {
|
|
59
61
|
matchResult = 0;
|
|
60
|
-
|
|
62
|
+
pair_1 = value_1(matchValue);
|
|
61
63
|
}
|
|
62
64
|
else {
|
|
63
65
|
matchResult = 1;
|
|
@@ -89,14 +91,24 @@ export class Dictionary {
|
|
|
89
91
|
"System.Collections.Generic.ICollection`1.Remove2B595"(item) {
|
|
90
92
|
const this$ = this;
|
|
91
93
|
const matchValue = Dictionary__TryFind_2B595(this$, item[0]);
|
|
94
|
+
let matchResult = undefined, pair_1 = undefined;
|
|
92
95
|
if (matchValue != null) {
|
|
93
96
|
if (equals(value_1(matchValue)[1], item[1])) {
|
|
94
|
-
|
|
97
|
+
matchResult = 0;
|
|
98
|
+
pair_1 = value_1(matchValue);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
matchResult = 1;
|
|
95
102
|
}
|
|
96
|
-
return true;
|
|
97
103
|
}
|
|
98
104
|
else {
|
|
99
|
-
|
|
105
|
+
matchResult = 1;
|
|
106
|
+
}
|
|
107
|
+
switch (matchResult) {
|
|
108
|
+
case 0:
|
|
109
|
+
return Dictionary__Remove_2B595(this$, item[0]);
|
|
110
|
+
default:
|
|
111
|
+
return false;
|
|
100
112
|
}
|
|
101
113
|
}
|
|
102
114
|
"System.Collections.Generic.IDictionary`2.Add5BDDA1"(key, value) {
|
|
@@ -205,7 +217,7 @@ function Dictionary__TryFindIndex_2B595(this$, k) {
|
|
|
205
217
|
}
|
|
206
218
|
export function Dictionary__TryFind_2B595(this$, k) {
|
|
207
219
|
const matchValue = Dictionary__TryFindIndex_2B595(this$, k);
|
|
208
|
-
let matchResult;
|
|
220
|
+
let matchResult = undefined;
|
|
209
221
|
if (matchValue[0]) {
|
|
210
222
|
if (matchValue[2] > -1) {
|
|
211
223
|
matchResult = 0;
|
|
@@ -219,9 +231,9 @@ export function Dictionary__TryFind_2B595(this$, k) {
|
|
|
219
231
|
}
|
|
220
232
|
switch (matchResult) {
|
|
221
233
|
case 0:
|
|
222
|
-
return getItemFromDict(this$.hashMap, matchValue[1])
|
|
234
|
+
return item_1(matchValue[2], getItemFromDict(this$.hashMap, matchValue[1]));
|
|
223
235
|
default:
|
|
224
|
-
return
|
|
236
|
+
return undefined;
|
|
225
237
|
}
|
|
226
238
|
}
|
|
227
239
|
export function Dictionary__get_Comparer(this$) {
|
|
@@ -250,17 +262,17 @@ export function Dictionary__get_Item_2B595(this$, k) {
|
|
|
250
262
|
return value_1(matchValue)[1];
|
|
251
263
|
}
|
|
252
264
|
else {
|
|
253
|
-
throw
|
|
265
|
+
throw KeyNotFoundException_$ctor_Z721C83C5("The item was not found in collection");
|
|
254
266
|
}
|
|
255
267
|
}
|
|
256
268
|
export function Dictionary__set_Item_5BDDA1(this$, k, v) {
|
|
257
269
|
const matchValue = Dictionary__TryFindIndex_2B595(this$, k);
|
|
258
270
|
if (matchValue[0]) {
|
|
259
271
|
if (matchValue[2] > -1) {
|
|
260
|
-
getItemFromDict(this$.hashMap, matchValue[1])
|
|
272
|
+
setItem(getItemFromDict(this$.hashMap, matchValue[1]), matchValue[2], [k, v]);
|
|
261
273
|
}
|
|
262
274
|
else {
|
|
263
|
-
|
|
275
|
+
void (getItemFromDict(this$.hashMap, matchValue[1]).push([k, v]));
|
|
264
276
|
}
|
|
265
277
|
}
|
|
266
278
|
else {
|
|
@@ -271,10 +283,10 @@ export function Dictionary__Add_5BDDA1(this$, k, v) {
|
|
|
271
283
|
const matchValue = Dictionary__TryFindIndex_2B595(this$, k);
|
|
272
284
|
if (matchValue[0]) {
|
|
273
285
|
if (matchValue[2] > -1) {
|
|
274
|
-
throw
|
|
286
|
+
throw ArgumentException_$ctor_Z721C83C5(format("An item with the same key has already been added. Key: {0}", k));
|
|
275
287
|
}
|
|
276
288
|
else {
|
|
277
|
-
|
|
289
|
+
void (getItemFromDict(this$.hashMap, matchValue[1]).push([k, v]));
|
|
278
290
|
}
|
|
279
291
|
}
|
|
280
292
|
else {
|
|
@@ -283,7 +295,7 @@ export function Dictionary__Add_5BDDA1(this$, k, v) {
|
|
|
283
295
|
}
|
|
284
296
|
export function Dictionary__ContainsKey_2B595(this$, k) {
|
|
285
297
|
const matchValue = Dictionary__TryFindIndex_2B595(this$, k);
|
|
286
|
-
let matchResult;
|
|
298
|
+
let matchResult = undefined;
|
|
287
299
|
if (matchValue[0]) {
|
|
288
300
|
if (matchValue[2] > -1) {
|
|
289
301
|
matchResult = 0;
|
|
@@ -304,7 +316,7 @@ export function Dictionary__ContainsKey_2B595(this$, k) {
|
|
|
304
316
|
}
|
|
305
317
|
export function Dictionary__Remove_2B595(this$, k) {
|
|
306
318
|
const matchValue = Dictionary__TryFindIndex_2B595(this$, k);
|
|
307
|
-
let matchResult;
|
|
319
|
+
let matchResult = undefined;
|
|
308
320
|
if (matchValue[0]) {
|
|
309
321
|
if (matchValue[2] > -1) {
|
|
310
322
|
matchResult = 0;
|
package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableSet.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { disposeSafe, defaultOf, toIterator, getEnumerator } from "./Util.js";
|
|
2
2
|
import { iterate, map, iterateIndexed, concat } from "./Seq.js";
|
|
3
|
-
import { setItem } from "./Array.js";
|
|
3
|
+
import { item as item_1, setItem } from "./Array.js";
|
|
4
4
|
import { some } from "./Option.js";
|
|
5
5
|
import { FSharpRef } from "./Types.js";
|
|
6
6
|
import { class_type } from "./Reflection.js";
|
|
@@ -132,7 +132,7 @@ function HashSet__TryFindIndex_2B595(this$, k) {
|
|
|
132
132
|
}
|
|
133
133
|
function HashSet__TryFind_2B595(this$, k) {
|
|
134
134
|
const matchValue = HashSet__TryFindIndex_2B595(this$, k);
|
|
135
|
-
let matchResult;
|
|
135
|
+
let matchResult = undefined;
|
|
136
136
|
if (matchValue[0]) {
|
|
137
137
|
if (matchValue[2] > -1) {
|
|
138
138
|
matchResult = 0;
|
|
@@ -146,9 +146,9 @@ function HashSet__TryFind_2B595(this$, k) {
|
|
|
146
146
|
}
|
|
147
147
|
switch (matchResult) {
|
|
148
148
|
case 0:
|
|
149
|
-
return some(getItemFromDict(this$.hashMap, matchValue[1])
|
|
149
|
+
return some(item_1(matchValue[2], getItemFromDict(this$.hashMap, matchValue[1])));
|
|
150
150
|
default:
|
|
151
|
-
return
|
|
151
|
+
return undefined;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
export function HashSet__get_Comparer(this$) {
|
|
@@ -178,7 +178,7 @@ export function HashSet__Add_2B595(this$, k) {
|
|
|
178
178
|
return false;
|
|
179
179
|
}
|
|
180
180
|
else {
|
|
181
|
-
|
|
181
|
+
void (getItemFromDict(this$.hashMap, matchValue[1]).push(k));
|
|
182
182
|
return true;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -189,7 +189,7 @@ export function HashSet__Add_2B595(this$, k) {
|
|
|
189
189
|
}
|
|
190
190
|
export function HashSet__Contains_2B595(this$, k) {
|
|
191
191
|
const matchValue = HashSet__TryFindIndex_2B595(this$, k);
|
|
192
|
-
let matchResult;
|
|
192
|
+
let matchResult = undefined;
|
|
193
193
|
if (matchValue[0]) {
|
|
194
194
|
if (matchValue[2] > -1) {
|
|
195
195
|
matchResult = 0;
|
|
@@ -210,7 +210,7 @@ export function HashSet__Contains_2B595(this$, k) {
|
|
|
210
210
|
}
|
|
211
211
|
export function HashSet__Remove_2B595(this$, k) {
|
|
212
212
|
const matchValue = HashSet__TryFindIndex_2B595(this$, k);
|
|
213
|
-
let matchResult;
|
|
213
|
+
let matchResult = undefined;
|
|
214
214
|
if (matchValue[0]) {
|
|
215
215
|
if (matchValue[2] > -1) {
|
|
216
216
|
matchResult = 0;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function Helpers_allocateArrayFromCons(cons, len) {
|
|
2
|
+
if (cons == null) {
|
|
3
|
+
return new Array(len);
|
|
4
|
+
}
|
|
5
|
+
else {
|
|
6
|
+
const cons_1 = cons;
|
|
7
|
+
if ((typeof cons_1) === "function") {
|
|
8
|
+
return new cons_1(len);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return new Array(len);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -2,6 +2,10 @@ export const symbol = Symbol("numeric");
|
|
|
2
2
|
export function isNumeric(x) {
|
|
3
3
|
return typeof x === "number" || typeof x === "bigint" || x?.[symbol];
|
|
4
4
|
}
|
|
5
|
+
export function isIntegral(x) {
|
|
6
|
+
// Not perfect, because in JS we can't distinguish between 1.0 and 1
|
|
7
|
+
return typeof x === "number" && Number.isInteger(x) || typeof x === "bigint";
|
|
8
|
+
}
|
|
5
9
|
export function compare(x, y) {
|
|
6
10
|
if (typeof x === "number") {
|
|
7
11
|
return x < y ? -1 : (x > y ? 1 : 0);
|
|
@@ -24,12 +28,24 @@ export function multiply(x, y) {
|
|
|
24
28
|
return x[symbol]().multiply(y);
|
|
25
29
|
}
|
|
26
30
|
}
|
|
31
|
+
export function divide(x, y) {
|
|
32
|
+
if (typeof x === "number") {
|
|
33
|
+
return x / y;
|
|
34
|
+
}
|
|
35
|
+
else if (typeof x === "bigint") {
|
|
36
|
+
// Keep the fractional part so the caller can round it like .NET does
|
|
37
|
+
return Number(x) / y;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return x[symbol]().multiply(1 / y);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
27
43
|
export function toFixed(x, dp) {
|
|
28
44
|
if (typeof x === "number") {
|
|
29
45
|
return x.toFixed(dp);
|
|
30
46
|
}
|
|
31
47
|
else if (typeof x === "bigint") {
|
|
32
|
-
return x;
|
|
48
|
+
return x.toString();
|
|
33
49
|
}
|
|
34
50
|
else {
|
|
35
51
|
return x[symbol]().toFixed(dp);
|
|
@@ -40,18 +56,43 @@ export function toPrecision(x, sd) {
|
|
|
40
56
|
return x.toPrecision(sd);
|
|
41
57
|
}
|
|
42
58
|
else if (typeof x === "bigint") {
|
|
43
|
-
return x;
|
|
59
|
+
return x.toString();
|
|
44
60
|
}
|
|
45
61
|
else {
|
|
46
62
|
return x[symbol]().toPrecision(sd);
|
|
47
63
|
}
|
|
48
64
|
}
|
|
65
|
+
// A bigint can hold more significant digits than a double, so the mantissa is rounded on the
|
|
66
|
+
// decimal digits themselves instead of going through Number
|
|
67
|
+
function bigintToExponential(x, dp) {
|
|
68
|
+
const sign = x < 0n ? "-" : "";
|
|
69
|
+
let digits = (x < 0n ? -x : x).toString();
|
|
70
|
+
if (x === 0n) {
|
|
71
|
+
return sign + (dp ? "0." + "0".repeat(dp) : "0") + "e+0";
|
|
72
|
+
}
|
|
73
|
+
dp = dp ?? digits.length - 1;
|
|
74
|
+
let exponent = digits.length - 1;
|
|
75
|
+
if (digits.length > dp + 1) {
|
|
76
|
+
// .NET rounds the discarded digits away from zero
|
|
77
|
+
const roundUp = digits.charCodeAt(dp + 1) >= 53;
|
|
78
|
+
digits = (BigInt(digits.slice(0, dp + 1)) + (roundUp ? 1n : 0n)).toString();
|
|
79
|
+
if (digits.length > dp + 1) {
|
|
80
|
+
digits = digits.slice(0, dp + 1);
|
|
81
|
+
exponent += 1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
digits = digits.padEnd(dp + 1, "0");
|
|
86
|
+
}
|
|
87
|
+
const mantissa = dp > 0 ? digits[0] + "." + digits.slice(1) : digits[0];
|
|
88
|
+
return sign + mantissa + "e+" + exponent;
|
|
89
|
+
}
|
|
49
90
|
export function toExponential(x, dp) {
|
|
50
91
|
if (typeof x === "number") {
|
|
51
92
|
return x.toExponential(dp);
|
|
52
93
|
}
|
|
53
94
|
else if (typeof x === "bigint") {
|
|
54
|
-
return x;
|
|
95
|
+
return bigintToExponential(x, dp);
|
|
55
96
|
}
|
|
56
97
|
else {
|
|
57
98
|
return x[symbol]().toExponential(dp);
|
package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Observable.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Choice_tryValueIfChoice1Of2, Choice_tryValueIfChoice2Of2 } from "./Choice.js";
|
|
2
|
-
import { value } from "./Option.js";
|
|
2
|
+
import { some, value } from "./Option.js";
|
|
3
3
|
export class Observer {
|
|
4
4
|
constructor(onNext, onError, onCompleted) {
|
|
5
5
|
this.OnNext = onNext;
|
|
@@ -29,7 +29,7 @@ export function choose(chooser, source) {
|
|
|
29
29
|
} }, observer.OnError), observer.OnError, observer.OnCompleted)));
|
|
30
30
|
}
|
|
31
31
|
export function filter(predicate, source) {
|
|
32
|
-
return choose((x) => predicate(x) ? x :
|
|
32
|
+
return choose((x) => predicate(x) ? some(x) : undefined, source);
|
|
33
33
|
}
|
|
34
34
|
export function map(mapping, source) {
|
|
35
35
|
return new Observable((observer) => source.Subscribe(new Observer((t) => {
|
|
@@ -84,11 +84,13 @@ export function merge(source1, source2) {
|
|
|
84
84
|
export function pairwise(source) {
|
|
85
85
|
return new Observable((observer) => {
|
|
86
86
|
let last;
|
|
87
|
+
let haveLast = false;
|
|
87
88
|
return source.Subscribe(new Observer((next) => {
|
|
88
|
-
if (
|
|
89
|
+
if (haveLast) {
|
|
89
90
|
observer.OnNext([last, next]);
|
|
90
91
|
}
|
|
91
92
|
last = next;
|
|
93
|
+
haveLast = true;
|
|
92
94
|
}, observer.OnError, observer.OnCompleted));
|
|
93
95
|
});
|
|
94
96
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { structuralHash, equals, compare } from "./Util.js";
|
|
1
|
+
import { Exception, structuralHash, equals, compare } from "./Util.js";
|
|
2
2
|
// Using a class here for better compatibility with TS files importing Some
|
|
3
3
|
export class Some {
|
|
4
4
|
constructor(value) {
|
|
@@ -31,9 +31,17 @@ export class Some {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
export function nonNullValue(x) {
|
|
35
|
+
if (x == null) {
|
|
36
|
+
throw new Exception("Nullable has no value");
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return x;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
34
42
|
export function value(x) {
|
|
35
43
|
if (x == null) {
|
|
36
|
-
throw new
|
|
44
|
+
throw new Exception("Option has no value");
|
|
37
45
|
}
|
|
38
46
|
else {
|
|
39
47
|
return x instanceof Some ? x.value : x;
|
|
@@ -62,30 +70,13 @@ export function toArray(opt) {
|
|
|
62
70
|
export function defaultArg(opt, defaultValue) {
|
|
63
71
|
return (opt != null) ? value(opt) : defaultValue;
|
|
64
72
|
}
|
|
65
|
-
export function defaultArgWith(opt, defThunk) {
|
|
66
|
-
return (opt != null) ? value(opt) : defThunk();
|
|
67
|
-
}
|
|
68
73
|
export function orElse(opt, ifNone) {
|
|
69
74
|
return opt == null ? ifNone : opt;
|
|
70
75
|
}
|
|
71
|
-
|
|
72
|
-
return opt == null ? ifNoneThunk() : opt;
|
|
73
|
-
}
|
|
74
|
-
export function filter(predicate, opt) {
|
|
75
|
-
return (opt != null) ? (predicate(value(opt)) ? opt : undefined) : opt;
|
|
76
|
-
}
|
|
76
|
+
// Only used by Replacements.Util.fs's curry/uncurry helpers, not by `Option.map` itself.
|
|
77
77
|
export function map(mapping, opt) {
|
|
78
78
|
return (opt != null) ? some(mapping(value(opt))) : undefined;
|
|
79
79
|
}
|
|
80
|
-
export function map2(mapping, opt1, opt2) {
|
|
81
|
-
return (opt1 != null && opt2 != null) ? mapping(value(opt1), value(opt2)) : undefined;
|
|
82
|
-
}
|
|
83
|
-
export function map3(mapping, opt1, opt2, opt3) {
|
|
84
|
-
return (opt1 != null && opt2 != null && opt3 != null) ? mapping(value(opt1), value(opt2), value(opt3)) : undefined;
|
|
85
|
-
}
|
|
86
|
-
export function bind(binder, opt) {
|
|
87
|
-
return opt != null ? binder(value(opt)) : undefined;
|
|
88
|
-
}
|
|
89
80
|
export function tryOp(op, arg) {
|
|
90
81
|
try {
|
|
91
82
|
return some(op(arg));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// This library doesn't depend on @types/node (to stay browser-compatible),
|
|
2
|
+
// so these Node.js built-in imports can't be type-checked; the exported
|
|
3
|
+
// functions below still declare their own types for callers to rely on.
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { basename, extname, join } from "node:path";
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import { tmpdir } from "node:os";
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import { writeFileSync } from "node:fs";
|
|
10
|
+
// Mirrors the format of .NET's Path.GetRandomFileName(): 8 random hex chars,
|
|
11
|
+
// a dot, then 3 more random hex chars.
|
|
12
|
+
export function getRandomFileName() {
|
|
13
|
+
const nameBytes = new Uint8Array(4);
|
|
14
|
+
crypto.getRandomValues(nameBytes);
|
|
15
|
+
const name = Array.from(nameBytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
16
|
+
const extBytes = new Uint8Array(2);
|
|
17
|
+
crypto.getRandomValues(extBytes);
|
|
18
|
+
const ext = Array.from(extBytes, (b) => b.toString(16).padStart(2, "0")).join("").slice(0, 3);
|
|
19
|
+
return `${name}.${ext}`;
|
|
20
|
+
}
|
|
21
|
+
export function getFileNameWithoutExtension(path) {
|
|
22
|
+
return basename(path, extname(path));
|
|
23
|
+
}
|
|
24
|
+
export function hasExtension(path) {
|
|
25
|
+
return extname(path) !== "";
|
|
26
|
+
}
|
|
27
|
+
export function getTempFileName() {
|
|
28
|
+
const path = join(tmpdir(), getRandomFileName());
|
|
29
|
+
writeFileSync(path, "");
|
|
30
|
+
return path;
|
|
31
|
+
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
import { ArgumentNullException_$ctor_Z721C83C5, ArgumentOutOfRangeException_$ctor_Z721C83C5 } from "./System.js";
|
|
2
|
+
import { Operators_IsNull } from "./FSharp.Core.js";
|
|
1
3
|
import { class_type } from "./Reflection.js";
|
|
2
|
-
import { fromFloat64, op_Addition,
|
|
3
|
-
import { item,
|
|
4
|
+
import { fromFloat64, op_Addition, toInt32_unchecked, toFloat64, compare, fromInt32, toInt64_unchecked } from "./BigInt.js";
|
|
5
|
+
import { item, setItem } from "./Array.js";
|
|
4
6
|
function Native_random() {
|
|
5
7
|
return Math.random();
|
|
6
8
|
}
|
|
7
|
-
function Native_randomNext(
|
|
8
|
-
if (
|
|
9
|
-
throw
|
|
9
|
+
function Native_randomNext(minValue, maxValue) {
|
|
10
|
+
if (maxValue < minValue) {
|
|
11
|
+
throw ArgumentOutOfRangeException_$ctor_Z721C83C5("minValue must be less than maxValue");
|
|
10
12
|
}
|
|
11
|
-
return Math.floor(Math.random() * (
|
|
13
|
+
return Math.floor(Math.random() * (maxValue - minValue)) + minValue;
|
|
12
14
|
}
|
|
13
15
|
function Native_randomBytes(buffer) {
|
|
14
|
-
if (buffer
|
|
15
|
-
throw
|
|
16
|
+
if (Operators_IsNull(buffer)) {
|
|
17
|
+
throw ArgumentNullException_$ctor_Z721C83C5("buffer");
|
|
16
18
|
}
|
|
17
19
|
for (let i = 0; i < buffer.length; i += 6) {
|
|
18
20
|
// Pick random 48-bit number. Fill buffer in 2 24-bit chunks to avoid bitwise truncation.
|
|
@@ -32,13 +34,13 @@ export class NonSeeded {
|
|
|
32
34
|
constructor() {
|
|
33
35
|
}
|
|
34
36
|
Next0() {
|
|
35
|
-
return Native_randomNext(0, 2147483647);
|
|
37
|
+
return Native_randomNext(0, 2147483647) | 0;
|
|
36
38
|
}
|
|
37
39
|
Next1(maxValue) {
|
|
38
|
-
return Native_randomNext(0, maxValue);
|
|
40
|
+
return Native_randomNext(0, maxValue) | 0;
|
|
39
41
|
}
|
|
40
42
|
Next2(minValue, maxValue) {
|
|
41
|
-
return Native_randomNext(minValue, maxValue);
|
|
43
|
+
return Native_randomNext(minValue, maxValue) | 0;
|
|
42
44
|
}
|
|
43
45
|
NextDouble() {
|
|
44
46
|
return Native_random();
|
|
@@ -48,7 +50,7 @@ export class NonSeeded {
|
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
export function NonSeeded_$reflection() {
|
|
51
|
-
return class_type("Random.NonSeeded",
|
|
53
|
+
return class_type("Random.NonSeeded", undefined, NonSeeded);
|
|
52
54
|
}
|
|
53
55
|
export function NonSeeded_$ctor() {
|
|
54
56
|
return new NonSeeded();
|
|
@@ -58,7 +60,7 @@ export class Seeded {
|
|
|
58
60
|
this.MBIG = 2147483647;
|
|
59
61
|
this.inext = 0;
|
|
60
62
|
this.inextp = 0;
|
|
61
|
-
this.seedArray =
|
|
63
|
+
this.seedArray = (new Int32Array(56));
|
|
62
64
|
let ii = 0;
|
|
63
65
|
let mj = 0;
|
|
64
66
|
let mk = 0;
|
|
@@ -93,17 +95,17 @@ export class Seeded {
|
|
|
93
95
|
Next1(maxValue) {
|
|
94
96
|
const this$ = this;
|
|
95
97
|
if (maxValue < 0) {
|
|
96
|
-
throw
|
|
98
|
+
throw ArgumentOutOfRangeException_$ctor_Z721C83C5("maxValue must be positive");
|
|
97
99
|
}
|
|
98
100
|
return ~~(Seeded__Sample(this$) * maxValue) | 0;
|
|
99
101
|
}
|
|
100
102
|
Next2(minValue, maxValue) {
|
|
101
103
|
const this$ = this;
|
|
102
104
|
if (minValue > maxValue) {
|
|
103
|
-
throw
|
|
105
|
+
throw ArgumentOutOfRangeException_$ctor_Z721C83C5("minValue must be less than maxValue");
|
|
104
106
|
}
|
|
105
|
-
const range =
|
|
106
|
-
return ((compare(range,
|
|
107
|
+
const range = toInt64_unchecked(fromInt32(maxValue - minValue));
|
|
108
|
+
return ((compare(range, toInt64_unchecked(fromInt32(2147483647))) <= 0) ? (~~(Seeded__Sample(this$) * toFloat64(range)) + minValue) : ~~toInt32_unchecked(toInt64_unchecked(op_Addition(toInt64_unchecked(fromFloat64(Seeded__GetSampleForLargeRange(this$) * toFloat64(range))), toInt64_unchecked(fromInt32(minValue)))))) | 0;
|
|
107
109
|
}
|
|
108
110
|
NextDouble() {
|
|
109
111
|
const this$ = this;
|
|
@@ -111,8 +113,8 @@ export class Seeded {
|
|
|
111
113
|
}
|
|
112
114
|
NextBytes(buffer) {
|
|
113
115
|
const this$ = this;
|
|
114
|
-
if (buffer
|
|
115
|
-
throw
|
|
116
|
+
if (Operators_IsNull(buffer)) {
|
|
117
|
+
throw ArgumentNullException_$ctor_Z721C83C5("buffer");
|
|
116
118
|
}
|
|
117
119
|
for (let i = 0; i <= (buffer.length - 1); i++) {
|
|
118
120
|
setItem(buffer, i, (Seeded__InternalSample(this$) % (~~255 + 1)) & 0xFF);
|
|
@@ -120,7 +122,7 @@ export class Seeded {
|
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
export function Seeded_$reflection() {
|
|
123
|
-
return class_type("Random.Seeded",
|
|
125
|
+
return class_type("Random.Seeded", undefined, Seeded);
|
|
124
126
|
}
|
|
125
127
|
export function Seeded_$ctor_Z524259A4(seed) {
|
|
126
128
|
return new Seeded(seed);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { compare } from "./Util.js";
|
|
1
|
+
import { Exception, compare } from "./Util.js";
|
|
2
2
|
import { unfold, delay } from "./Seq.js";
|
|
3
|
-
import {
|
|
3
|
+
import { toUInt64_unchecked, toInt64_unchecked, op_Addition, fromZero } from "./BigInt.js";
|
|
4
4
|
import { op_Addition as op_Addition_1, fromParts } from "./Decimal.js";
|
|
5
5
|
export function makeRangeStepFunction(step, stop, zero, add) {
|
|
6
6
|
const stepComparedWithZero = compare(step, zero) | 0;
|
|
7
7
|
if (stepComparedWithZero === 0) {
|
|
8
|
-
throw new
|
|
8
|
+
throw new Exception("The step of a range cannot be zero");
|
|
9
9
|
}
|
|
10
10
|
const stepGreaterThanZero = stepComparedWithZero > 0;
|
|
11
11
|
return (x) => {
|
|
12
12
|
const comparedWithLast = compare(x, stop) | 0;
|
|
13
|
-
return ((stepGreaterThanZero && (comparedWithLast <= 0)) ? true : (!stepGreaterThanZero && (comparedWithLast >= 0))) ? [x, add(x, step)] :
|
|
13
|
+
return ((stepGreaterThanZero && (comparedWithLast <= 0)) ? true : (!stepGreaterThanZero && (comparedWithLast >= 0))) ? [x, add(x, step)] : undefined;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
export function integralRangeStep(start, step, stop, zero, add) {
|
|
@@ -27,19 +27,19 @@ export function rangeDouble(start, step, stop) {
|
|
|
27
27
|
return integralRangeStep(start, step, stop, 0, (x, y) => (x + y));
|
|
28
28
|
}
|
|
29
29
|
export function rangeInt64(start, step, stop) {
|
|
30
|
-
return integralRangeStep(start, step, stop, 0n, (x, y) =>
|
|
30
|
+
return integralRangeStep(start, step, stop, 0n, (x, y) => toInt64_unchecked(op_Addition(x, y)));
|
|
31
31
|
}
|
|
32
32
|
export function rangeUInt64(start, step, stop) {
|
|
33
|
-
return integralRangeStep(start, step, stop, 0n, (x, y) =>
|
|
33
|
+
return integralRangeStep(start, step, stop, 0n, (x, y) => toUInt64_unchecked(op_Addition(x, y)));
|
|
34
34
|
}
|
|
35
35
|
export function rangeChar(start, stop) {
|
|
36
|
-
const intStop = stop.charCodeAt(0) | 0;
|
|
37
|
-
return delay(() => unfold((
|
|
38
|
-
if (
|
|
39
|
-
return [String.fromCharCode(
|
|
36
|
+
const intStop = ~~stop.charCodeAt(0) | 0;
|
|
37
|
+
return delay(() => unfold((i) => {
|
|
38
|
+
if (i <= intStop) {
|
|
39
|
+
return [String.fromCharCode(i & 0xFFFF), i + 1];
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
return
|
|
42
|
+
return undefined;
|
|
43
43
|
}
|
|
44
|
-
}, start.charCodeAt(0)));
|
|
44
|
+
}, ~~start.charCodeAt(0)));
|
|
45
45
|
}
|