@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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getPrefix, isValid } from "./Int32.js";
|
|
2
|
+
import { fromString } from "./BigInt.js";
|
|
3
|
+
import { Exception } from "./Util.js";
|
|
4
|
+
function getRange(unsigned, bitsize) {
|
|
5
|
+
switch (bitsize) {
|
|
6
|
+
case 64: return unsigned ?
|
|
7
|
+
[0n, 18446744073709551615n] :
|
|
8
|
+
[-9223372036854775808n, 9223372036854775807n];
|
|
9
|
+
default: throw new Exception("Invalid bit size.");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function parse(str, style, unsigned, bitsize, radix) {
|
|
13
|
+
const res = isValid(str, style, radix);
|
|
14
|
+
if (res != null) {
|
|
15
|
+
let v = fromString(getPrefix(res.radix) + res.digits);
|
|
16
|
+
if (res.sign === "-") {
|
|
17
|
+
v = -v;
|
|
18
|
+
}
|
|
19
|
+
const [umin, umax] = getRange(true, bitsize);
|
|
20
|
+
if (!unsigned && res.radix !== 10 && v >= umin && v <= umax) {
|
|
21
|
+
v = BigInt.asIntN(bitsize, v);
|
|
22
|
+
}
|
|
23
|
+
const [min, max] = getRange(unsigned, bitsize);
|
|
24
|
+
if (v >= min && v <= max) {
|
|
25
|
+
return v;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
throw new Exception(`The input string ${str} was not in a correct format.`);
|
|
29
|
+
}
|
|
30
|
+
export function tryParse(str, style, unsigned, bitsize, defValue) {
|
|
31
|
+
try {
|
|
32
|
+
defValue.contents = parse(str, style, unsigned, bitsize);
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MailboxProcessor.js
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defaultCancellationToken } from "./Async.js";
|
|
2
2
|
import { fromContinuations } from "./Async.js";
|
|
3
3
|
import { startImmediate } from "./Async.js";
|
|
4
|
+
import { Exception } from "./Util.js";
|
|
4
5
|
class QueueCell {
|
|
5
6
|
constructor(message) {
|
|
6
7
|
this.value = message;
|
|
@@ -26,7 +27,9 @@ class MailboxQueue {
|
|
|
26
27
|
else {
|
|
27
28
|
delete this.firstAndLast;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
// Wrap the value so falsy messages (0, false, "", null, undefined/unit)
|
|
31
|
+
// can be distinguished from an empty queue.
|
|
32
|
+
return { value };
|
|
30
33
|
}
|
|
31
34
|
return void 0;
|
|
32
35
|
}
|
|
@@ -40,11 +43,11 @@ export class MailboxProcessor {
|
|
|
40
43
|
}
|
|
41
44
|
function __processEvents($this) {
|
|
42
45
|
if ($this.continuation) {
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
46
|
+
const dequeued = $this.messages.tryGet();
|
|
47
|
+
if (dequeued !== void 0) {
|
|
45
48
|
const cont = $this.continuation;
|
|
46
49
|
delete $this.continuation;
|
|
47
|
-
cont(value);
|
|
50
|
+
cont(dequeued.value);
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
}
|
|
@@ -54,7 +57,7 @@ export function startInstance($this) {
|
|
|
54
57
|
export function receive($this) {
|
|
55
58
|
return fromContinuations((conts) => {
|
|
56
59
|
if ($this.continuation) {
|
|
57
|
-
throw new
|
|
60
|
+
throw new Exception("Receive can only be called once!");
|
|
58
61
|
}
|
|
59
62
|
$this.continuation = conts[0];
|
|
60
63
|
__processEvents($this);
|
|
@@ -66,15 +69,19 @@ export function post($this, message) {
|
|
|
66
69
|
}
|
|
67
70
|
export function postAndAsyncReply($this, buildMessage) {
|
|
68
71
|
let result;
|
|
72
|
+
// Use an explicit flag because the reply value itself may be undefined
|
|
73
|
+
// (e.g. AsyncReplyChannel<unit>), which must still complete the async.
|
|
74
|
+
let replied = false;
|
|
69
75
|
let continuation;
|
|
70
76
|
function checkCompletion() {
|
|
71
|
-
if (
|
|
77
|
+
if (replied && continuation !== void 0) {
|
|
72
78
|
continuation(result);
|
|
73
79
|
}
|
|
74
80
|
}
|
|
75
81
|
const reply = {
|
|
76
82
|
reply: (res) => {
|
|
77
83
|
result = res;
|
|
84
|
+
replied = true;
|
|
78
85
|
checkCompletion();
|
|
79
86
|
},
|
|
80
87
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { record_type, bool_type, list_type, option_type, class_type } from "./Reflection.js";
|
|
2
2
|
import { some, value as value_1 } from "./Option.js";
|
|
3
|
-
import { structuralHash, compare, toIterator, equals, disposeSafe, getEnumerator, isArrayLike } from "./Util.js";
|
|
3
|
+
import { structuralHash, compare, toIterator, equals, disposeSafe, getEnumerator, isArrayLike, Exception } from "./Util.js";
|
|
4
|
+
import { KeyNotFoundException_$ctor } from "./System.Collections.Generic.js";
|
|
4
5
|
import { singleton, ofArrayWithTail, head, tail, isEmpty as isEmpty_1, fold as fold_1, empty as empty_1, FSharpList, cons } from "./List.js";
|
|
5
6
|
import { map as map_2, item, fill, setItem } from "./Array.js";
|
|
6
7
|
import { Record } from "./Types.js";
|
|
7
8
|
import { tryPick as tryPick_1, pick as pick_1, iterate as iterate_1, compareWith, map as map_1, unfold } from "./Seq.js";
|
|
8
9
|
import { format, join } from "./String.js";
|
|
10
|
+
import { NotSupportedException_$ctor_Z721C83C5 } from "./System.js";
|
|
9
11
|
export class MapTreeLeaf$2 {
|
|
10
12
|
constructor(k, v) {
|
|
11
13
|
this.k = k;
|
|
@@ -45,10 +47,10 @@ export function MapTreeNode$2__get_Right(_) {
|
|
|
45
47
|
return _.right;
|
|
46
48
|
}
|
|
47
49
|
export function MapTreeNode$2__get_Height(_) {
|
|
48
|
-
return _.h;
|
|
50
|
+
return _.h | 0;
|
|
49
51
|
}
|
|
50
52
|
export function MapTreeModule_empty() {
|
|
51
|
-
return
|
|
53
|
+
return undefined;
|
|
52
54
|
}
|
|
53
55
|
export function MapTreeModule_sizeAux(acc_mut, m_mut) {
|
|
54
56
|
MapTreeModule_sizeAux: while (true) {
|
|
@@ -72,10 +74,10 @@ export function MapTreeModule_sizeAux(acc_mut, m_mut) {
|
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
export function MapTreeModule_size(x) {
|
|
75
|
-
return MapTreeModule_sizeAux(0, x);
|
|
77
|
+
return MapTreeModule_sizeAux(0, x) | 0;
|
|
76
78
|
}
|
|
77
79
|
export function MapTreeModule_mk(l, k, v, r) {
|
|
78
|
-
let mn, mn_1;
|
|
80
|
+
let mn = undefined, mn_1 = undefined;
|
|
79
81
|
let hl;
|
|
80
82
|
const m = l;
|
|
81
83
|
if (m != null) {
|
|
@@ -103,7 +105,7 @@ export function MapTreeModule_mk(l, k, v, r) {
|
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
export function MapTreeModule_rebalance(t1, k, v, t2) {
|
|
106
|
-
let mn, mn_1, m_2, m2_2, mn_2, m_3, m2_3, mn_3;
|
|
108
|
+
let mn = undefined, mn_1 = undefined, m_2 = undefined, m2_2 = undefined, mn_2 = undefined, m_3 = undefined, m2_3 = undefined, mn_3 = undefined;
|
|
107
109
|
let t1h;
|
|
108
110
|
const m = t1;
|
|
109
111
|
if (m != null) {
|
|
@@ -133,7 +135,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
|
|
|
133
135
|
return MapTreeModule_mk(MapTreeModule_mk(t1, k, v, MapTreeNode$2__get_Left(t2l)), MapTreeLeaf$2__get_Key(t2l), MapTreeLeaf$2__get_Value(t2l), MapTreeModule_mk(MapTreeNode$2__get_Right(t2l), MapTreeLeaf$2__get_Key(t2$0027), MapTreeLeaf$2__get_Value(t2$0027), MapTreeNode$2__get_Right(t2$0027)));
|
|
134
136
|
}
|
|
135
137
|
else {
|
|
136
|
-
throw new
|
|
138
|
+
throw new Exception("internal error: Map.rebalance");
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
else {
|
|
@@ -141,7 +143,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
|
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
else {
|
|
144
|
-
throw new
|
|
146
|
+
throw new Exception("internal error: Map.rebalance");
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
149
|
else if (t1h > (t2h + 2)) {
|
|
@@ -155,7 +157,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
|
|
|
155
157
|
return MapTreeModule_mk(MapTreeModule_mk(MapTreeNode$2__get_Left(t1$0027), MapTreeLeaf$2__get_Key(t1$0027), MapTreeLeaf$2__get_Value(t1$0027), MapTreeNode$2__get_Left(t1r)), MapTreeLeaf$2__get_Key(t1r), MapTreeLeaf$2__get_Value(t1r), MapTreeModule_mk(MapTreeNode$2__get_Right(t1r), k, v, t2));
|
|
156
158
|
}
|
|
157
159
|
else {
|
|
158
|
-
throw new
|
|
160
|
+
throw new Exception("internal error: Map.rebalance");
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
163
|
else {
|
|
@@ -163,7 +165,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
|
|
|
163
165
|
}
|
|
164
166
|
}
|
|
165
167
|
else {
|
|
166
|
-
throw new
|
|
168
|
+
throw new Exception("internal error: Map.rebalance");
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
171
|
else {
|
|
@@ -217,11 +219,11 @@ export function MapTreeModule_tryFind(comparer_mut, k_mut, m_mut) {
|
|
|
217
219
|
continue MapTreeModule_tryFind;
|
|
218
220
|
}
|
|
219
221
|
else {
|
|
220
|
-
return
|
|
222
|
+
return undefined;
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
225
|
else {
|
|
224
|
-
return
|
|
226
|
+
return undefined;
|
|
225
227
|
}
|
|
226
228
|
break;
|
|
227
229
|
}
|
|
@@ -229,7 +231,7 @@ export function MapTreeModule_tryFind(comparer_mut, k_mut, m_mut) {
|
|
|
229
231
|
export function MapTreeModule_find(comparer, k, m) {
|
|
230
232
|
const matchValue = MapTreeModule_tryFind(comparer, k, m);
|
|
231
233
|
if (matchValue == null) {
|
|
232
|
-
throw
|
|
234
|
+
throw KeyNotFoundException_$ctor();
|
|
233
235
|
}
|
|
234
236
|
else {
|
|
235
237
|
return value_1(matchValue);
|
|
@@ -327,7 +329,7 @@ export function MapTreeModule_spliceOutSuccessor(m) {
|
|
|
327
329
|
}
|
|
328
330
|
}
|
|
329
331
|
else {
|
|
330
|
-
throw new
|
|
332
|
+
throw new Exception("internal error: Map.spliceOutSuccessor");
|
|
331
333
|
}
|
|
332
334
|
}
|
|
333
335
|
export function MapTreeModule_remove(comparer, k, m) {
|
|
@@ -398,7 +400,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
|
|
|
398
400
|
else {
|
|
399
401
|
const c_1 = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;
|
|
400
402
|
if (c_1 < 0) {
|
|
401
|
-
const matchValue_2 = u(
|
|
403
|
+
const matchValue_2 = u(undefined);
|
|
402
404
|
if (matchValue_2 != null) {
|
|
403
405
|
return MapTreeNode$2_$ctor_Z39DE9543(k, value_1(matchValue_2), MapTreeModule_empty(), m, 2);
|
|
404
406
|
}
|
|
@@ -416,7 +418,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
|
|
|
416
418
|
}
|
|
417
419
|
}
|
|
418
420
|
else {
|
|
419
|
-
const matchValue_4 = u(
|
|
421
|
+
const matchValue_4 = u(undefined);
|
|
420
422
|
if (matchValue_4 != null) {
|
|
421
423
|
return MapTreeNode$2_$ctor_Z39DE9543(k, value_1(matchValue_4), m, MapTreeModule_empty(), 2);
|
|
422
424
|
}
|
|
@@ -427,7 +429,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
|
|
|
427
429
|
}
|
|
428
430
|
}
|
|
429
431
|
else {
|
|
430
|
-
const matchValue = u(
|
|
432
|
+
const matchValue = u(undefined);
|
|
431
433
|
if (matchValue != null) {
|
|
432
434
|
return MapTreeLeaf$2_$ctor_5BDDA1(k, value_1(matchValue));
|
|
433
435
|
}
|
|
@@ -521,7 +523,7 @@ export function MapTreeModule_tryPickOpt(f_mut, m_mut) {
|
|
|
521
523
|
}
|
|
522
524
|
}
|
|
523
525
|
else {
|
|
524
|
-
return
|
|
526
|
+
return undefined;
|
|
525
527
|
}
|
|
526
528
|
break;
|
|
527
529
|
}
|
|
@@ -700,11 +702,15 @@ export function MapTreeModule_foldSectionOpt(comparer, lo, hi, f, m, x) {
|
|
|
700
702
|
return x_3;
|
|
701
703
|
}
|
|
702
704
|
}
|
|
703
|
-
else if ((comparer.Compare(lo, MapTreeLeaf$2__get_Key(m2)) <= 0) && (comparer.Compare(MapTreeLeaf$2__get_Key(m2), hi) <= 0)) {
|
|
704
|
-
return f_1(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x_1);
|
|
705
|
-
}
|
|
706
705
|
else {
|
|
707
|
-
|
|
706
|
+
const cLoKey_1 = comparer.Compare(lo, MapTreeLeaf$2__get_Key(m2)) | 0;
|
|
707
|
+
const cKeyHi_1 = comparer.Compare(MapTreeLeaf$2__get_Key(m2), hi) | 0;
|
|
708
|
+
if ((cLoKey_1 <= 0) && (cKeyHi_1 <= 0)) {
|
|
709
|
+
return f_1(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x_1);
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
return x_1;
|
|
713
|
+
}
|
|
708
714
|
}
|
|
709
715
|
}
|
|
710
716
|
else {
|
|
@@ -804,6 +810,9 @@ export function MapTreeModule_ofSeq(comparer, c) {
|
|
|
804
810
|
}
|
|
805
811
|
}
|
|
806
812
|
}
|
|
813
|
+
/**
|
|
814
|
+
* Imperative left-to-right iterators.
|
|
815
|
+
*/
|
|
807
816
|
export class MapTreeModule_MapIterator$2 extends Record {
|
|
808
817
|
constructor(stack, started) {
|
|
809
818
|
super();
|
|
@@ -846,10 +855,10 @@ export function MapTreeModule_mkIterator(m) {
|
|
|
846
855
|
return new MapTreeModule_MapIterator$2(MapTreeModule_collapseLHS(singleton(m)), false);
|
|
847
856
|
}
|
|
848
857
|
export function MapTreeModule_notStarted() {
|
|
849
|
-
throw new
|
|
858
|
+
throw new Exception("enumeration not started");
|
|
850
859
|
}
|
|
851
860
|
export function MapTreeModule_alreadyFinished() {
|
|
852
|
-
throw new
|
|
861
|
+
throw new Exception("enumeration already finished");
|
|
853
862
|
}
|
|
854
863
|
export function MapTreeModule_current(i) {
|
|
855
864
|
if (i.started) {
|
|
@@ -858,14 +867,14 @@ export function MapTreeModule_current(i) {
|
|
|
858
867
|
if (head(matchValue) != null) {
|
|
859
868
|
const m = value_1(head(matchValue));
|
|
860
869
|
if (m instanceof MapTreeNode$2) {
|
|
861
|
-
throw new
|
|
870
|
+
throw new Exception("Please report error: Map iterator, unexpected stack for current");
|
|
862
871
|
}
|
|
863
872
|
else {
|
|
864
873
|
return [MapTreeLeaf$2__get_Key(m), MapTreeLeaf$2__get_Value(m)];
|
|
865
874
|
}
|
|
866
875
|
}
|
|
867
876
|
else {
|
|
868
|
-
throw new
|
|
877
|
+
throw new Exception("Please report error: Map iterator, unexpected stack for current");
|
|
869
878
|
}
|
|
870
879
|
}
|
|
871
880
|
else {
|
|
@@ -883,7 +892,7 @@ export function MapTreeModule_moveNext(i) {
|
|
|
883
892
|
if (head(matchValue) != null) {
|
|
884
893
|
const m = value_1(head(matchValue));
|
|
885
894
|
if (m instanceof MapTreeNode$2) {
|
|
886
|
-
throw new
|
|
895
|
+
throw new Exception("Please report error: Map iterator, unexpected stack for moveNext");
|
|
887
896
|
}
|
|
888
897
|
else {
|
|
889
898
|
i.stack = MapTreeModule_collapseLHS(tail(matchValue));
|
|
@@ -891,7 +900,7 @@ export function MapTreeModule_moveNext(i) {
|
|
|
891
900
|
}
|
|
892
901
|
}
|
|
893
902
|
else {
|
|
894
|
-
throw new
|
|
903
|
+
throw new Exception("Please report error: Map iterator, unexpected stack for moveNext");
|
|
895
904
|
}
|
|
896
905
|
}
|
|
897
906
|
else {
|
|
@@ -928,7 +937,7 @@ export function MapTreeModule_toSeq(s) {
|
|
|
928
937
|
return [en_1["System.Collections.Generic.IEnumerator`1.get_Current"](), en_1];
|
|
929
938
|
}
|
|
930
939
|
else {
|
|
931
|
-
return
|
|
940
|
+
return undefined;
|
|
932
941
|
}
|
|
933
942
|
}, MapTreeModule_mkIEnumerator(s));
|
|
934
943
|
}
|
|
@@ -937,7 +946,7 @@ export function MapTreeModule_leftmost(m_mut) {
|
|
|
937
946
|
const m = m_mut;
|
|
938
947
|
if (m != null) {
|
|
939
948
|
const m2 = value_1(m);
|
|
940
|
-
let matchResult, nd_1;
|
|
949
|
+
let matchResult = undefined, nd_1 = undefined;
|
|
941
950
|
if (m2 instanceof MapTreeNode$2) {
|
|
942
951
|
if (MapTreeNode$2__get_Height(m2) > 1) {
|
|
943
952
|
matchResult = 0;
|
|
@@ -964,7 +973,7 @@ export function MapTreeModule_leftmost(m_mut) {
|
|
|
964
973
|
}
|
|
965
974
|
}
|
|
966
975
|
else {
|
|
967
|
-
throw
|
|
976
|
+
throw KeyNotFoundException_$ctor();
|
|
968
977
|
}
|
|
969
978
|
break;
|
|
970
979
|
}
|
|
@@ -974,7 +983,7 @@ export function MapTreeModule_rightmost(m_mut) {
|
|
|
974
983
|
const m = m_mut;
|
|
975
984
|
if (m != null) {
|
|
976
985
|
const m2 = value_1(m);
|
|
977
|
-
let matchResult, nd_1;
|
|
986
|
+
let matchResult = undefined, nd_1 = undefined;
|
|
978
987
|
if (m2 instanceof MapTreeNode$2) {
|
|
979
988
|
if (MapTreeNode$2__get_Height(m2) > 1) {
|
|
980
989
|
matchResult = 0;
|
|
@@ -1001,7 +1010,7 @@ export function MapTreeModule_rightmost(m_mut) {
|
|
|
1001
1010
|
}
|
|
1002
1011
|
}
|
|
1003
1012
|
else {
|
|
1004
|
-
throw
|
|
1013
|
+
throw KeyNotFoundException_$ctor();
|
|
1005
1014
|
}
|
|
1006
1015
|
break;
|
|
1007
1016
|
}
|
|
@@ -1015,13 +1024,13 @@ export class FSharpMap {
|
|
|
1015
1024
|
const this$ = this;
|
|
1016
1025
|
return FSharpMap__ComputeHashCode(this$) | 0;
|
|
1017
1026
|
}
|
|
1018
|
-
Equals(
|
|
1027
|
+
Equals(other) {
|
|
1019
1028
|
const this$ = this;
|
|
1020
|
-
if (
|
|
1021
|
-
const
|
|
1029
|
+
if (other instanceof FSharpMap) {
|
|
1030
|
+
const that = other;
|
|
1022
1031
|
const e1 = getEnumerator(this$);
|
|
1023
1032
|
try {
|
|
1024
|
-
const e2 = getEnumerator(
|
|
1033
|
+
const e2 = getEnumerator(that);
|
|
1025
1034
|
try {
|
|
1026
1035
|
const loop = () => {
|
|
1027
1036
|
const m1 = e1["System.Collections.IEnumerator.MoveNext"]();
|
|
@@ -1080,27 +1089,22 @@ export class FSharpMap {
|
|
|
1080
1089
|
const _ = this;
|
|
1081
1090
|
return MapTreeModule_mkIEnumerator(_.tree);
|
|
1082
1091
|
}
|
|
1083
|
-
CompareTo(
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}, m, m2) | 0;
|
|
1091
|
-
}
|
|
1092
|
-
else {
|
|
1093
|
-
throw new Error("not comparable\\nParameter name: obj");
|
|
1094
|
-
}
|
|
1092
|
+
CompareTo(other) {
|
|
1093
|
+
let that = undefined;
|
|
1094
|
+
const this$ = this;
|
|
1095
|
+
return ((other instanceof FSharpMap) ? ((that = other, compareWith((kvp1, kvp2) => {
|
|
1096
|
+
const c = this$.comparer.Compare(kvp1[0], kvp2[0]) | 0;
|
|
1097
|
+
return ((c !== 0) ? c : compare(kvp1[1], kvp2[1])) | 0;
|
|
1098
|
+
}, this$, that))) : 1) | 0;
|
|
1095
1099
|
}
|
|
1096
1100
|
"System.Collections.Generic.ICollection`1.Add2B595"(x) {
|
|
1097
|
-
throw
|
|
1101
|
+
throw NotSupportedException_$ctor_Z721C83C5("Map cannot be mutated");
|
|
1098
1102
|
}
|
|
1099
1103
|
"System.Collections.Generic.ICollection`1.Clear"() {
|
|
1100
|
-
throw
|
|
1104
|
+
throw NotSupportedException_$ctor_Z721C83C5("Map cannot be mutated");
|
|
1101
1105
|
}
|
|
1102
1106
|
"System.Collections.Generic.ICollection`1.Remove2B595"(x) {
|
|
1103
|
-
throw
|
|
1107
|
+
throw NotSupportedException_$ctor_Z721C83C5("Map cannot be mutated");
|
|
1104
1108
|
}
|
|
1105
1109
|
"System.Collections.Generic.ICollection`1.Contains2B595"(x) {
|
|
1106
1110
|
const m = this;
|
|
@@ -1126,10 +1130,10 @@ export class FSharpMap {
|
|
|
1126
1130
|
return FSharpMap__get_Count(m) | 0;
|
|
1127
1131
|
}
|
|
1128
1132
|
clear() {
|
|
1129
|
-
throw new
|
|
1133
|
+
throw new Exception("Map cannot be mutated");
|
|
1130
1134
|
}
|
|
1131
1135
|
delete(_arg) {
|
|
1132
|
-
throw new
|
|
1136
|
+
throw new Exception("Map cannot be mutated");
|
|
1133
1137
|
return false;
|
|
1134
1138
|
}
|
|
1135
1139
|
entries() {
|
|
@@ -1150,7 +1154,7 @@ export class FSharpMap {
|
|
|
1150
1154
|
}
|
|
1151
1155
|
set(k, v) {
|
|
1152
1156
|
const m = this;
|
|
1153
|
-
throw new
|
|
1157
|
+
throw new Exception("Map cannot be mutated");
|
|
1154
1158
|
return m;
|
|
1155
1159
|
}
|
|
1156
1160
|
values() {
|
|
@@ -1223,7 +1227,7 @@ export function FSharpMap__Partition(m, predicate) {
|
|
|
1223
1227
|
return [FSharpMap_$ctor(m.comparer, patternInput[0]), FSharpMap_$ctor(m.comparer, patternInput[1])];
|
|
1224
1228
|
}
|
|
1225
1229
|
export function FSharpMap__get_Count(m) {
|
|
1226
|
-
return MapTreeModule_size(m.tree);
|
|
1230
|
+
return MapTreeModule_size(m.tree) | 0;
|
|
1227
1231
|
}
|
|
1228
1232
|
export function FSharpMap__ContainsKey(m, key) {
|
|
1229
1233
|
return MapTreeModule_mem(m.comparer, key, m.tree);
|
|
@@ -1264,7 +1268,7 @@ export function FSharpMap__ToArray(m) {
|
|
|
1264
1268
|
return MapTreeModule_toArray(m.tree);
|
|
1265
1269
|
}
|
|
1266
1270
|
export function FSharpMap__ComputeHashCode(this$) {
|
|
1267
|
-
const combineHash = (x, y) => (((x << 1) + y) + 631);
|
|
1271
|
+
const combineHash = (x, y) => ((((x << 1) + y) + 631) | 0);
|
|
1268
1272
|
let res = 0;
|
|
1269
1273
|
const enumerator = getEnumerator(this$);
|
|
1270
1274
|
try {
|
|
@@ -1312,7 +1316,7 @@ export function pick(chooser, table) {
|
|
|
1312
1316
|
return value_1(matchValue);
|
|
1313
1317
|
}
|
|
1314
1318
|
else {
|
|
1315
|
-
throw
|
|
1319
|
+
throw KeyNotFoundException_$ctor();
|
|
1316
1320
|
}
|
|
1317
1321
|
}
|
|
1318
1322
|
export function exists(predicate, table) {
|
|
@@ -1346,7 +1350,7 @@ export function findKey(predicate, table) {
|
|
|
1346
1350
|
return some(k);
|
|
1347
1351
|
}
|
|
1348
1352
|
else {
|
|
1349
|
-
return
|
|
1353
|
+
return undefined;
|
|
1350
1354
|
}
|
|
1351
1355
|
}, table);
|
|
1352
1356
|
}
|
|
@@ -1357,7 +1361,7 @@ export function tryFindKey(predicate, table) {
|
|
|
1357
1361
|
return some(k);
|
|
1358
1362
|
}
|
|
1359
1363
|
else {
|
|
1360
|
-
return
|
|
1364
|
+
return undefined;
|
|
1361
1365
|
}
|
|
1362
1366
|
}, table);
|
|
1363
1367
|
}
|
|
@@ -1392,5 +1396,5 @@ export function empty(comparer) {
|
|
|
1392
1396
|
return FSharpMap_Empty(comparer);
|
|
1393
1397
|
}
|
|
1394
1398
|
export function count(table) {
|
|
1395
|
-
return FSharpMap__get_Count(table);
|
|
1399
|
+
return FSharpMap__get_Count(table) | 0;
|
|
1396
1400
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { equals } from "./Util.js";
|
|
1
|
+
import { Exception, equals } from "./Util.js";
|
|
2
2
|
import { Union } from "./Types.js";
|
|
3
3
|
const CaseRules = {
|
|
4
4
|
None: 0,
|
|
@@ -6,6 +6,7 @@ const CaseRules = {
|
|
|
6
6
|
SnakeCase: 2,
|
|
7
7
|
SnakeCaseAllCaps: 3,
|
|
8
8
|
KebabCase: 4,
|
|
9
|
+
LowerAll: 5,
|
|
9
10
|
};
|
|
10
11
|
function dashify(str, separator) {
|
|
11
12
|
return str.replace(/[a-z]?[A-Z]/g, (m) => m.length === 1
|
|
@@ -22,6 +23,8 @@ function changeCase(str, caseRule) {
|
|
|
22
23
|
return dashify(str, "_").toUpperCase();
|
|
23
24
|
case CaseRules.KebabCase:
|
|
24
25
|
return dashify(str, "-");
|
|
26
|
+
case CaseRules.LowerAll:
|
|
27
|
+
return str.toLowerCase();
|
|
25
28
|
case CaseRules.None:
|
|
26
29
|
default:
|
|
27
30
|
return str;
|
|
@@ -31,7 +34,7 @@ export function keyValueList(fields, caseRule = CaseRules.None) {
|
|
|
31
34
|
const obj = {};
|
|
32
35
|
const definedCaseRule = caseRule;
|
|
33
36
|
function fail(kvPair) {
|
|
34
|
-
throw new
|
|
37
|
+
throw new Exception("Cannot infer key and value of " + String(kvPair));
|
|
35
38
|
}
|
|
36
39
|
function assign(key, caseRule, value) {
|
|
37
40
|
key = changeCase(key, caseRule);
|
|
@@ -96,9 +99,16 @@ export function addToSet(v, set) {
|
|
|
96
99
|
set.add(v);
|
|
97
100
|
return true;
|
|
98
101
|
}
|
|
102
|
+
export function tryAddToDict(dict, k, v) {
|
|
103
|
+
if (dict.has(k)) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
dict.set(k, v);
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
99
109
|
export function addToDict(dict, k, v) {
|
|
100
110
|
if (dict.has(k)) {
|
|
101
|
-
throw new
|
|
111
|
+
throw new Exception("An item with the same key has already been added. Key: " + k);
|
|
102
112
|
}
|
|
103
113
|
dict.set(k, v);
|
|
104
114
|
}
|
|
@@ -107,6 +117,14 @@ export function getItemFromDict(map, key) {
|
|
|
107
117
|
return map.get(key);
|
|
108
118
|
}
|
|
109
119
|
else {
|
|
110
|
-
throw new
|
|
120
|
+
throw new Exception(`The given key '${key}' was not present in the dictionary.`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export function getItemFromDictOrCreate(map, key, createValue) {
|
|
124
|
+
if (map.has(key)) {
|
|
125
|
+
return map.get(key);
|
|
111
126
|
}
|
|
127
|
+
const value = createValue(key);
|
|
128
|
+
map.set(key, value);
|
|
129
|
+
return value;
|
|
112
130
|
}
|