@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
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { disposeSafe, getEnumerator, copyToArray, defaultOf, Exception } from "./Util.js";
|
|
1
2
|
import { Helpers_allocateArrayFromCons } from "./Native.js";
|
|
2
3
|
import { setItem as setItem_1, item as item_2 } from "./Array.js";
|
|
3
|
-
import { value as value_2,
|
|
4
|
+
import { value as value_2, defaultArg, some } from "./Option.js";
|
|
4
5
|
import { min as min_1, max as max_1 } from "./Double.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import { SR_notEnoughElements, SR_inputMustBeNonNegative, SR_inputSequenceEmpty, SR_Arg_ArgumentOutOfRangeException, SR_indexOutOfBounds } from "./Global.js";
|
|
7
|
+
import { Operators_IsNull } from "./FSharp.Core.js";
|
|
8
|
+
import { nonSeeded } from "./Random.js";
|
|
7
9
|
function indexNotFound() {
|
|
8
|
-
throw new
|
|
10
|
+
throw new Exception("An index satisfying the predicate was not found in the collection.");
|
|
9
11
|
}
|
|
10
12
|
function differentLengths() {
|
|
11
|
-
throw new
|
|
13
|
+
throw new Exception("Arrays had different lengths");
|
|
12
14
|
}
|
|
13
15
|
export function append(array1, array2, cons) {
|
|
14
16
|
const len1 = array1.length | 0;
|
|
@@ -35,13 +37,13 @@ export function getSubArray(array, start, count) {
|
|
|
35
37
|
}
|
|
36
38
|
export function last(array) {
|
|
37
39
|
if (array.length === 0) {
|
|
38
|
-
throw new
|
|
40
|
+
throw new Exception("The input array was empty (Parameter \'array\')");
|
|
39
41
|
}
|
|
40
42
|
return item_2(array.length - 1, array);
|
|
41
43
|
}
|
|
42
44
|
export function tryLast(array) {
|
|
43
45
|
if (array.length === 0) {
|
|
44
|
-
return
|
|
46
|
+
return undefined;
|
|
45
47
|
}
|
|
46
48
|
else {
|
|
47
49
|
return some(item_2(array.length - 1, array));
|
|
@@ -65,7 +67,7 @@ export function map(f, source, cons) {
|
|
|
65
67
|
}
|
|
66
68
|
export function mapIndexed2(f, source1, source2, cons) {
|
|
67
69
|
if (source1.length !== source2.length) {
|
|
68
|
-
throw new
|
|
70
|
+
throw new Exception("Arrays had different lengths");
|
|
69
71
|
}
|
|
70
72
|
const result = Helpers_allocateArrayFromCons(cons, source1.length);
|
|
71
73
|
for (let i = 0; i <= (source1.length - 1); i++) {
|
|
@@ -75,7 +77,7 @@ export function mapIndexed2(f, source1, source2, cons) {
|
|
|
75
77
|
}
|
|
76
78
|
export function map2(f, source1, source2, cons) {
|
|
77
79
|
if (source1.length !== source2.length) {
|
|
78
|
-
throw new
|
|
80
|
+
throw new Exception("Arrays had different lengths");
|
|
79
81
|
}
|
|
80
82
|
const result = Helpers_allocateArrayFromCons(cons, source1.length);
|
|
81
83
|
for (let i = 0; i <= (source1.length - 1); i++) {
|
|
@@ -85,7 +87,7 @@ export function map2(f, source1, source2, cons) {
|
|
|
85
87
|
}
|
|
86
88
|
export function mapIndexed3(f, source1, source2, source3, cons) {
|
|
87
89
|
if ((source1.length !== source2.length) ? true : (source2.length !== source3.length)) {
|
|
88
|
-
throw new
|
|
90
|
+
throw new Exception("Arrays had different lengths");
|
|
89
91
|
}
|
|
90
92
|
const result = Helpers_allocateArrayFromCons(cons, source1.length);
|
|
91
93
|
for (let i = 0; i <= (source1.length - 1); i++) {
|
|
@@ -95,7 +97,7 @@ export function mapIndexed3(f, source1, source2, source3, cons) {
|
|
|
95
97
|
}
|
|
96
98
|
export function map3(f, source1, source2, source3, cons) {
|
|
97
99
|
if ((source1.length !== source2.length) ? true : (source2.length !== source3.length)) {
|
|
98
|
-
throw new
|
|
100
|
+
throw new Exception("Arrays had different lengths");
|
|
99
101
|
}
|
|
100
102
|
const result = Helpers_allocateArrayFromCons(cons, source1.length);
|
|
101
103
|
for (let i = 0; i <= (source1.length - 1); i++) {
|
|
@@ -181,8 +183,9 @@ export function where(predicate, array) {
|
|
|
181
183
|
return array.filter(predicate);
|
|
182
184
|
}
|
|
183
185
|
export function indexOf(array, item_1, start, count, eq) {
|
|
186
|
+
let option_1 = undefined;
|
|
184
187
|
const start_1 = defaultArg(start, 0) | 0;
|
|
185
|
-
const end$0027 = defaultArg(
|
|
188
|
+
const end$0027 = defaultArg((option_1 = count, (option_1 != null) ? (start_1 + value_2(option_1)) : undefined), array.length) | 0;
|
|
186
189
|
const loop = (i_mut) => {
|
|
187
190
|
loop: while (true) {
|
|
188
191
|
const i = i_mut;
|
|
@@ -202,7 +205,7 @@ export function indexOf(array, item_1, start, count, eq) {
|
|
|
202
205
|
return loop(start_1) | 0;
|
|
203
206
|
}
|
|
204
207
|
export function contains(value, array, eq) {
|
|
205
|
-
return indexOf(array, value,
|
|
208
|
+
return indexOf(array, value, undefined, undefined, eq) >= 0;
|
|
206
209
|
}
|
|
207
210
|
export function empty(cons) {
|
|
208
211
|
return Helpers_allocateArrayFromCons(cons, 0);
|
|
@@ -214,7 +217,7 @@ export function singleton(value, cons) {
|
|
|
214
217
|
}
|
|
215
218
|
export function initialize(count, initializer, cons) {
|
|
216
219
|
if (count < 0) {
|
|
217
|
-
throw new
|
|
220
|
+
throw new Exception("The input must be non-negative (Parameter \'count\')");
|
|
218
221
|
}
|
|
219
222
|
const result = Helpers_allocateArrayFromCons(cons, count);
|
|
220
223
|
for (let i = 0; i <= (count - 1); i++) {
|
|
@@ -237,7 +240,7 @@ export function pairwise(array) {
|
|
|
237
240
|
}
|
|
238
241
|
export function replicate(count, initial, cons) {
|
|
239
242
|
if (count < 0) {
|
|
240
|
-
throw new
|
|
243
|
+
throw new Exception("The input must be non-negative (Parameter \'count\')");
|
|
241
244
|
}
|
|
242
245
|
const result = Helpers_allocateArrayFromCons(cons, count);
|
|
243
246
|
for (let i = 0; i <= (result.length - 1); i++) {
|
|
@@ -273,7 +276,7 @@ export function scanBack(folder, array, state, cons) {
|
|
|
273
276
|
}
|
|
274
277
|
export function skip(count, array, cons) {
|
|
275
278
|
if (count > array.length) {
|
|
276
|
-
throw new
|
|
279
|
+
throw new Exception("count is greater than array length (Parameter \'count\')");
|
|
277
280
|
}
|
|
278
281
|
if (count === array.length) {
|
|
279
282
|
return Helpers_allocateArrayFromCons(cons, 0);
|
|
@@ -298,10 +301,10 @@ export function skipWhile(predicate, array, cons) {
|
|
|
298
301
|
}
|
|
299
302
|
export function take(count, array, cons) {
|
|
300
303
|
if (count < 0) {
|
|
301
|
-
throw new
|
|
304
|
+
throw new Exception("The input must be non-negative (Parameter \'count\')");
|
|
302
305
|
}
|
|
303
306
|
if (count > array.length) {
|
|
304
|
-
throw new
|
|
307
|
+
throw new Exception("count is greater than array length (Parameter \'count\')");
|
|
305
308
|
}
|
|
306
309
|
if (count === 0) {
|
|
307
310
|
return Helpers_allocateArrayFromCons(cons, 0);
|
|
@@ -323,6 +326,13 @@ export function takeWhile(predicate, array, cons) {
|
|
|
323
326
|
return array.slice(0, (0 + count_1));
|
|
324
327
|
}
|
|
325
328
|
}
|
|
329
|
+
export function findAll(predicate, array) {
|
|
330
|
+
return array.filter(predicate);
|
|
331
|
+
}
|
|
332
|
+
export function getRange(array, start, count) {
|
|
333
|
+
const start_1 = start | 0;
|
|
334
|
+
return array.slice(start_1, (start_1 + count));
|
|
335
|
+
}
|
|
326
336
|
export function addInPlace(x, array) {
|
|
327
337
|
array.push(x);
|
|
328
338
|
}
|
|
@@ -338,11 +348,11 @@ export function addRangeInPlace(range, array) {
|
|
|
338
348
|
}
|
|
339
349
|
}
|
|
340
350
|
export function insertRangeInPlace(index, range, array) {
|
|
341
|
-
let index_1;
|
|
342
351
|
let i = index;
|
|
343
352
|
const enumerator = getEnumerator(range);
|
|
344
353
|
try {
|
|
345
354
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
355
|
+
let index_1 = undefined;
|
|
346
356
|
const x = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
347
357
|
(index_1 = (i | 0), array.splice(index_1, 0, x));
|
|
348
358
|
i = ((i + 1) | 0);
|
|
@@ -353,7 +363,7 @@ export function insertRangeInPlace(index, range, array) {
|
|
|
353
363
|
}
|
|
354
364
|
}
|
|
355
365
|
export function removeInPlace(item_1, array, eq) {
|
|
356
|
-
const i = indexOf(array, item_1,
|
|
366
|
+
const i = indexOf(array, item_1, undefined, undefined, eq) | 0;
|
|
357
367
|
if (i > -1) {
|
|
358
368
|
array.splice(i, 1);
|
|
359
369
|
return true;
|
|
@@ -364,7 +374,9 @@ export function removeInPlace(item_1, array, eq) {
|
|
|
364
374
|
}
|
|
365
375
|
export function removeAllInPlace(predicate, array) {
|
|
366
376
|
const countRemoveAll = (count) => {
|
|
367
|
-
|
|
377
|
+
let i;
|
|
378
|
+
const array_1 = array;
|
|
379
|
+
i = (array_1.findIndex(predicate));
|
|
368
380
|
if (i > -1) {
|
|
369
381
|
array.splice(i, 1);
|
|
370
382
|
return (countRemoveAll(count) + 1) | 0;
|
|
@@ -421,7 +433,7 @@ export function tryFindIndex(predicate, array) {
|
|
|
421
433
|
return matchValue;
|
|
422
434
|
}
|
|
423
435
|
else {
|
|
424
|
-
return
|
|
436
|
+
return undefined;
|
|
425
437
|
}
|
|
426
438
|
}
|
|
427
439
|
export function pick(chooser, array) {
|
|
@@ -451,7 +463,7 @@ export function tryPick(chooser, array) {
|
|
|
451
463
|
loop: while (true) {
|
|
452
464
|
const i = i_mut;
|
|
453
465
|
if (i >= array.length) {
|
|
454
|
-
return
|
|
466
|
+
return undefined;
|
|
455
467
|
}
|
|
456
468
|
else {
|
|
457
469
|
const matchValue = chooser(item_2(i, array));
|
|
@@ -492,7 +504,7 @@ export function tryFindBack(predicate, array) {
|
|
|
492
504
|
loop: while (true) {
|
|
493
505
|
const i = i_mut;
|
|
494
506
|
if (i < 0) {
|
|
495
|
-
return
|
|
507
|
+
return undefined;
|
|
496
508
|
}
|
|
497
509
|
else if (predicate(item_2(i, array))) {
|
|
498
510
|
return some(item_2(i, array));
|
|
@@ -550,7 +562,7 @@ export function tryFindIndexBack(predicate, array) {
|
|
|
550
562
|
loop: while (true) {
|
|
551
563
|
const i = i_mut;
|
|
552
564
|
if (i < 0) {
|
|
553
|
-
return
|
|
565
|
+
return undefined;
|
|
554
566
|
}
|
|
555
567
|
else if (predicate(item_2(i, array))) {
|
|
556
568
|
return i;
|
|
@@ -573,7 +585,7 @@ export function choose(chooser, array, cons) {
|
|
|
573
585
|
res.push(y);
|
|
574
586
|
}
|
|
575
587
|
}
|
|
576
|
-
if (
|
|
588
|
+
if (cons == null) {
|
|
577
589
|
return res;
|
|
578
590
|
}
|
|
579
591
|
else {
|
|
@@ -626,13 +638,13 @@ export function permute(f, array) {
|
|
|
626
638
|
iterateIndexed((i, x) => {
|
|
627
639
|
const j = f(i) | 0;
|
|
628
640
|
if ((j < 0) ? true : (j >= size)) {
|
|
629
|
-
throw new
|
|
641
|
+
throw new Exception("Not a valid permutation");
|
|
630
642
|
}
|
|
631
643
|
setItem_1(res, j, x);
|
|
632
644
|
setItem_1(checkFlags, j, 1);
|
|
633
645
|
}, array);
|
|
634
646
|
if (!(checkFlags.every((y) => (1 === y)))) {
|
|
635
|
-
throw new
|
|
647
|
+
throw new Exception("Not a valid permutation");
|
|
636
648
|
}
|
|
637
649
|
return res;
|
|
638
650
|
}
|
|
@@ -645,29 +657,29 @@ export function setSlice(target, lower, upper, source) {
|
|
|
645
657
|
}
|
|
646
658
|
}
|
|
647
659
|
export function sortInPlaceBy(projection, xs, comparer) {
|
|
648
|
-
xs.sort((x, y) => comparer.Compare(projection(x), projection(y)));
|
|
660
|
+
xs.sort((x, y) => (comparer.Compare(projection(x), projection(y)) | 0));
|
|
649
661
|
}
|
|
650
662
|
export function sortInPlace(xs, comparer) {
|
|
651
|
-
xs.sort((x, y) => comparer.Compare(x, y));
|
|
663
|
+
xs.sort((x, y) => (comparer.Compare(x, y) | 0));
|
|
652
664
|
}
|
|
653
665
|
export function sort(xs, comparer) {
|
|
654
666
|
const xs_1 = xs.slice();
|
|
655
|
-
xs_1.sort((x, y) => comparer.Compare(x, y));
|
|
667
|
+
xs_1.sort((x, y) => (comparer.Compare(x, y) | 0));
|
|
656
668
|
return xs_1;
|
|
657
669
|
}
|
|
658
670
|
export function sortBy(projection, xs, comparer) {
|
|
659
671
|
const xs_1 = xs.slice();
|
|
660
|
-
xs_1.sort((x, y) => comparer.Compare(projection(x), projection(y)));
|
|
672
|
+
xs_1.sort((x, y) => (comparer.Compare(projection(x), projection(y)) | 0));
|
|
661
673
|
return xs_1;
|
|
662
674
|
}
|
|
663
675
|
export function sortDescending(xs, comparer) {
|
|
664
676
|
const xs_1 = xs.slice();
|
|
665
|
-
xs_1.sort((x, y) => (comparer.Compare(x, y) * -1));
|
|
677
|
+
xs_1.sort((x, y) => ((comparer.Compare(x, y) * -1) | 0));
|
|
666
678
|
return xs_1;
|
|
667
679
|
}
|
|
668
680
|
export function sortByDescending(projection, xs, comparer) {
|
|
669
681
|
const xs_1 = xs.slice();
|
|
670
|
-
xs_1.sort((x, y) => (comparer.Compare(projection(x), projection(y)) * -1));
|
|
682
|
+
xs_1.sort((x, y) => ((comparer.Compare(projection(x), projection(y)) * -1) | 0));
|
|
671
683
|
return xs_1;
|
|
672
684
|
}
|
|
673
685
|
export function sortWith(comparer, xs) {
|
|
@@ -750,38 +762,36 @@ export function zip3(array1, array2, array3) {
|
|
|
750
762
|
}
|
|
751
763
|
export function chunkBySize(chunkSize, array) {
|
|
752
764
|
if (chunkSize < 1) {
|
|
753
|
-
throw new
|
|
754
|
-
}
|
|
755
|
-
if (array.length === 0) {
|
|
756
|
-
return [[]];
|
|
765
|
+
throw new Exception("The input must be positive. (Parameter \'size\')");
|
|
757
766
|
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
767
|
+
const result = [];
|
|
768
|
+
if (array.length > 0) {
|
|
769
|
+
const chunks = ~~Math.ceil(array.length / chunkSize) | 0;
|
|
770
|
+
for (let x = 0; x <= (chunks - 1); x++) {
|
|
761
771
|
let slice;
|
|
762
772
|
const start_1 = (x * chunkSize) | 0;
|
|
763
773
|
slice = (array.slice(start_1, (start_1 + chunkSize)));
|
|
764
774
|
result.push(slice);
|
|
765
775
|
}
|
|
766
|
-
return result;
|
|
767
776
|
}
|
|
777
|
+
return result;
|
|
768
778
|
}
|
|
769
779
|
export function splitAt(index, array) {
|
|
770
780
|
if ((index < 0) ? true : (index > array.length)) {
|
|
771
|
-
throw new
|
|
781
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
772
782
|
}
|
|
773
783
|
return [array.slice(0, (0 + index)), array.slice(index)];
|
|
774
784
|
}
|
|
775
785
|
export function compareWith(comparer, source1, source2) {
|
|
776
|
-
if (source1
|
|
777
|
-
if (source2
|
|
786
|
+
if (Operators_IsNull(source1)) {
|
|
787
|
+
if (Operators_IsNull(source2)) {
|
|
778
788
|
return 0;
|
|
779
789
|
}
|
|
780
790
|
else {
|
|
781
791
|
return -1;
|
|
782
792
|
}
|
|
783
793
|
}
|
|
784
|
-
else if (source2
|
|
794
|
+
else if (Operators_IsNull(source2)) {
|
|
785
795
|
return 1;
|
|
786
796
|
}
|
|
787
797
|
else {
|
|
@@ -809,15 +819,15 @@ export function compareWith(comparer, source1, source2) {
|
|
|
809
819
|
}
|
|
810
820
|
}
|
|
811
821
|
export function compareTo(comparer, source1, source2) {
|
|
812
|
-
if (source1
|
|
813
|
-
if (source2
|
|
822
|
+
if (Operators_IsNull(source1)) {
|
|
823
|
+
if (Operators_IsNull(source2)) {
|
|
814
824
|
return 0;
|
|
815
825
|
}
|
|
816
826
|
else {
|
|
817
827
|
return -1;
|
|
818
828
|
}
|
|
819
829
|
}
|
|
820
|
-
else if (source2
|
|
830
|
+
else if (Operators_IsNull(source2)) {
|
|
821
831
|
return 1;
|
|
822
832
|
}
|
|
823
833
|
else {
|
|
@@ -840,23 +850,23 @@ export function compareTo(comparer, source1, source2) {
|
|
|
840
850
|
}
|
|
841
851
|
}
|
|
842
852
|
}
|
|
843
|
-
export function equalsWith(equals,
|
|
844
|
-
if (
|
|
845
|
-
if (
|
|
853
|
+
export function equalsWith(equals, source1, source2) {
|
|
854
|
+
if (Operators_IsNull(source1)) {
|
|
855
|
+
if (Operators_IsNull(source2)) {
|
|
846
856
|
return true;
|
|
847
857
|
}
|
|
848
858
|
else {
|
|
849
859
|
return false;
|
|
850
860
|
}
|
|
851
861
|
}
|
|
852
|
-
else if (
|
|
862
|
+
else if (Operators_IsNull(source2)) {
|
|
853
863
|
return false;
|
|
854
864
|
}
|
|
855
865
|
else {
|
|
856
866
|
let i = 0;
|
|
857
867
|
let result = true;
|
|
858
|
-
const length1 =
|
|
859
|
-
const length2 =
|
|
868
|
+
const length1 = source1.length | 0;
|
|
869
|
+
const length2 = source2.length | 0;
|
|
860
870
|
if (length1 > length2) {
|
|
861
871
|
return false;
|
|
862
872
|
}
|
|
@@ -865,7 +875,7 @@ export function equalsWith(equals, array1, array2) {
|
|
|
865
875
|
}
|
|
866
876
|
else {
|
|
867
877
|
while ((i < length1) && result) {
|
|
868
|
-
result = equals(item_2(i,
|
|
878
|
+
result = equals(item_2(i, source1), item_2(i, source2));
|
|
869
879
|
i = ((i + 1) | 0);
|
|
870
880
|
}
|
|
871
881
|
return result;
|
|
@@ -877,9 +887,9 @@ export function exactlyOne(array) {
|
|
|
877
887
|
case 1:
|
|
878
888
|
return item_2(0, array);
|
|
879
889
|
case 0:
|
|
880
|
-
throw new
|
|
890
|
+
throw new Exception("The input sequence was empty (Parameter \'array\')");
|
|
881
891
|
default:
|
|
882
|
-
throw new
|
|
892
|
+
throw new Exception("Input array too long (Parameter \'array\')");
|
|
883
893
|
}
|
|
884
894
|
}
|
|
885
895
|
export function tryExactlyOne(array) {
|
|
@@ -887,12 +897,12 @@ export function tryExactlyOne(array) {
|
|
|
887
897
|
return some(item_2(0, array));
|
|
888
898
|
}
|
|
889
899
|
else {
|
|
890
|
-
return
|
|
900
|
+
return undefined;
|
|
891
901
|
}
|
|
892
902
|
}
|
|
893
903
|
export function head(array) {
|
|
894
904
|
if (array.length === 0) {
|
|
895
|
-
throw new
|
|
905
|
+
throw new Exception("The input array was empty (Parameter \'array\')");
|
|
896
906
|
}
|
|
897
907
|
else {
|
|
898
908
|
return item_2(0, array);
|
|
@@ -900,7 +910,7 @@ export function head(array) {
|
|
|
900
910
|
}
|
|
901
911
|
export function tryHead(array) {
|
|
902
912
|
if (array.length === 0) {
|
|
903
|
-
return
|
|
913
|
+
return undefined;
|
|
904
914
|
}
|
|
905
915
|
else {
|
|
906
916
|
return some(item_2(0, array));
|
|
@@ -908,13 +918,13 @@ export function tryHead(array) {
|
|
|
908
918
|
}
|
|
909
919
|
export function tail(array) {
|
|
910
920
|
if (array.length === 0) {
|
|
911
|
-
throw new
|
|
921
|
+
throw new Exception("Not enough elements (Parameter \'array\')");
|
|
912
922
|
}
|
|
913
923
|
return array.slice(1);
|
|
914
924
|
}
|
|
915
925
|
export function item(index, array) {
|
|
916
926
|
if ((index < 0) ? true : (index >= array.length)) {
|
|
917
|
-
throw new
|
|
927
|
+
throw new Exception("Index was outside the bounds of the array. (Parameter \'index\')");
|
|
918
928
|
}
|
|
919
929
|
else {
|
|
920
930
|
return array[index];
|
|
@@ -922,7 +932,7 @@ export function item(index, array) {
|
|
|
922
932
|
}
|
|
923
933
|
export function setItem(array, index, value) {
|
|
924
934
|
if ((index < 0) ? true : (index >= array.length)) {
|
|
925
|
-
throw new
|
|
935
|
+
throw new Exception("Index was outside the bounds of the array. (Parameter \'index\')");
|
|
926
936
|
}
|
|
927
937
|
else {
|
|
928
938
|
array[index] = value;
|
|
@@ -930,7 +940,7 @@ export function setItem(array, index, value) {
|
|
|
930
940
|
}
|
|
931
941
|
export function tryItem(index, array) {
|
|
932
942
|
if ((index < 0) ? true : (index >= array.length)) {
|
|
933
|
-
return
|
|
943
|
+
return undefined;
|
|
934
944
|
}
|
|
935
945
|
else {
|
|
936
946
|
return some(array[index]);
|
|
@@ -945,7 +955,7 @@ export function foldBack(folder, array, state) {
|
|
|
945
955
|
export function foldIndexed2(folder, state, array1, array2) {
|
|
946
956
|
let acc = state;
|
|
947
957
|
if (array1.length !== array2.length) {
|
|
948
|
-
throw new
|
|
958
|
+
throw new Exception("Arrays have different lengths");
|
|
949
959
|
}
|
|
950
960
|
for (let i = 0; i <= (array1.length - 1); i++) {
|
|
951
961
|
acc = folder(i, acc, item_2(i, array1), item_2(i, array2));
|
|
@@ -971,14 +981,14 @@ export function foldBack2(f, array1, array2, state) {
|
|
|
971
981
|
}
|
|
972
982
|
export function reduce(reduction, array) {
|
|
973
983
|
if (array.length === 0) {
|
|
974
|
-
throw new
|
|
984
|
+
throw new Exception("The input array was empty");
|
|
975
985
|
}
|
|
976
986
|
const reduction_1 = reduction;
|
|
977
987
|
return array.reduce(reduction_1);
|
|
978
988
|
}
|
|
979
989
|
export function reduceBack(reduction, array) {
|
|
980
990
|
if (array.length === 0) {
|
|
981
|
-
throw new
|
|
991
|
+
throw new Exception("The input array was empty");
|
|
982
992
|
}
|
|
983
993
|
const reduction_1 = reduction;
|
|
984
994
|
return array.reduceRight(reduction_1);
|
|
@@ -1060,7 +1070,7 @@ export function min(xs, comparer) {
|
|
|
1060
1070
|
}
|
|
1061
1071
|
export function average(array, averager) {
|
|
1062
1072
|
if (array.length === 0) {
|
|
1063
|
-
throw new
|
|
1073
|
+
throw new Exception("The input array was empty (Parameter \'array\')");
|
|
1064
1074
|
}
|
|
1065
1075
|
let total = averager.GetZero();
|
|
1066
1076
|
for (let i = 0; i <= (array.length - 1); i++) {
|
|
@@ -1070,7 +1080,7 @@ export function average(array, averager) {
|
|
|
1070
1080
|
}
|
|
1071
1081
|
export function averageBy(projection, array, averager) {
|
|
1072
1082
|
if (array.length === 0) {
|
|
1073
|
-
throw new
|
|
1083
|
+
throw new Exception("The input array was empty (Parameter \'array\')");
|
|
1074
1084
|
}
|
|
1075
1085
|
let total = averager.GetZero();
|
|
1076
1086
|
for (let i = 0; i <= (array.length - 1); i++) {
|
|
@@ -1080,7 +1090,7 @@ export function averageBy(projection, array, averager) {
|
|
|
1080
1090
|
}
|
|
1081
1091
|
export function windowed(windowSize, source) {
|
|
1082
1092
|
if (windowSize <= 0) {
|
|
1083
|
-
throw new
|
|
1093
|
+
throw new Exception("windowSize must be positive");
|
|
1084
1094
|
}
|
|
1085
1095
|
let res;
|
|
1086
1096
|
const len = max_1(0, (source.length - windowSize) + 1) | 0;
|
|
@@ -1092,13 +1102,10 @@ export function windowed(windowSize, source) {
|
|
|
1092
1102
|
}
|
|
1093
1103
|
export function splitInto(chunks, array) {
|
|
1094
1104
|
if (chunks < 1) {
|
|
1095
|
-
throw new
|
|
1096
|
-
}
|
|
1097
|
-
if (array.length === 0) {
|
|
1098
|
-
return [[]];
|
|
1105
|
+
throw new Exception("The input must be positive. (Parameter \'chunks\')");
|
|
1099
1106
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1107
|
+
const result = [];
|
|
1108
|
+
if (array.length > 0) {
|
|
1102
1109
|
const chunks_1 = min_1(chunks, array.length) | 0;
|
|
1103
1110
|
const minChunkSize = ~~(array.length / chunks_1) | 0;
|
|
1104
1111
|
const chunksWithExtraItem = (array.length % chunks_1) | 0;
|
|
@@ -1109,8 +1116,8 @@ export function splitInto(chunks, array) {
|
|
|
1109
1116
|
slice = (array.slice(start_1, (start_1 + chunkSize)));
|
|
1110
1117
|
result.push(slice);
|
|
1111
1118
|
}
|
|
1112
|
-
return result;
|
|
1113
1119
|
}
|
|
1120
|
+
return result;
|
|
1114
1121
|
}
|
|
1115
1122
|
export function transpose(arrays, cons) {
|
|
1116
1123
|
const arrays_1 = Array.isArray(arrays) ? arrays : (Array.from(arrays));
|
|
@@ -1137,7 +1144,7 @@ export function transpose(arrays, cons) {
|
|
|
1137
1144
|
export function insertAt(index, y, xs, cons) {
|
|
1138
1145
|
const len = xs.length | 0;
|
|
1139
1146
|
if ((index < 0) ? true : (index > len)) {
|
|
1140
|
-
throw new
|
|
1147
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1141
1148
|
}
|
|
1142
1149
|
const target = Helpers_allocateArrayFromCons(cons, len + 1);
|
|
1143
1150
|
for (let i = 0; i <= (index - 1); i++) {
|
|
@@ -1152,7 +1159,7 @@ export function insertAt(index, y, xs, cons) {
|
|
|
1152
1159
|
export function insertManyAt(index, ys, xs, cons) {
|
|
1153
1160
|
const len = xs.length | 0;
|
|
1154
1161
|
if ((index < 0) ? true : (index > len)) {
|
|
1155
|
-
throw new
|
|
1162
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1156
1163
|
}
|
|
1157
1164
|
const ys_1 = Array.from(ys);
|
|
1158
1165
|
const len2 = ys_1.length | 0;
|
|
@@ -1168,9 +1175,108 @@ export function insertManyAt(index, ys, xs, cons) {
|
|
|
1168
1175
|
}
|
|
1169
1176
|
return target;
|
|
1170
1177
|
}
|
|
1178
|
+
export function randomShuffleInPlaceBy(randomizer, xs) {
|
|
1179
|
+
const len = xs.length | 0;
|
|
1180
|
+
for (let i = len - 1; i >= 1; i--) {
|
|
1181
|
+
const r = randomizer();
|
|
1182
|
+
if ((r < 0) ? true : (r >= 1)) {
|
|
1183
|
+
throw new Exception(SR_Arg_ArgumentOutOfRangeException + " (Parameter \'randomizer\')");
|
|
1184
|
+
}
|
|
1185
|
+
const j = ~~(r * (i + 1)) | 0;
|
|
1186
|
+
const tmp = item_2(i, xs);
|
|
1187
|
+
setItem_1(xs, i, item_2(j, xs));
|
|
1188
|
+
setItem_1(xs, j, tmp);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
export function randomShuffleInPlaceWith(random, xs) {
|
|
1192
|
+
randomShuffleInPlaceBy(() => random.NextDouble(), xs);
|
|
1193
|
+
}
|
|
1194
|
+
export function randomShuffleInPlace(xs) {
|
|
1195
|
+
randomShuffleInPlaceWith(nonSeeded(), xs);
|
|
1196
|
+
}
|
|
1197
|
+
export function randomShuffleBy(randomizer, xs) {
|
|
1198
|
+
const arr = copy(xs);
|
|
1199
|
+
randomShuffleInPlaceBy(randomizer, arr);
|
|
1200
|
+
return arr;
|
|
1201
|
+
}
|
|
1202
|
+
export function randomShuffleWith(random, xs) {
|
|
1203
|
+
return randomShuffleBy(() => random.NextDouble(), xs);
|
|
1204
|
+
}
|
|
1205
|
+
export function randomShuffle(xs) {
|
|
1206
|
+
return randomShuffleWith(nonSeeded(), xs);
|
|
1207
|
+
}
|
|
1208
|
+
export function randomChoiceBy(randomizer, xs) {
|
|
1209
|
+
if (isEmpty(xs)) {
|
|
1210
|
+
throw new Exception(SR_inputSequenceEmpty + " (Parameter \'source\')");
|
|
1211
|
+
}
|
|
1212
|
+
const len = xs.length | 0;
|
|
1213
|
+
const r = randomizer();
|
|
1214
|
+
if ((r < 0) ? true : (r >= 1)) {
|
|
1215
|
+
throw new Exception(SR_Arg_ArgumentOutOfRangeException + " (Parameter \'randomizer\')");
|
|
1216
|
+
}
|
|
1217
|
+
return item_2(~~(r * len), xs);
|
|
1218
|
+
}
|
|
1219
|
+
export function randomChoiceWith(random, xs) {
|
|
1220
|
+
return randomChoiceBy(() => random.NextDouble(), xs);
|
|
1221
|
+
}
|
|
1222
|
+
export function randomChoice(xs) {
|
|
1223
|
+
return randomChoiceWith(nonSeeded(), xs);
|
|
1224
|
+
}
|
|
1225
|
+
export function randomChoicesBy(randomizer, count, xs, cons) {
|
|
1226
|
+
if (count < 0) {
|
|
1227
|
+
throw new Exception(SR_inputMustBeNonNegative + " (Parameter \'count\')");
|
|
1228
|
+
}
|
|
1229
|
+
if ((count > 0) && isEmpty(xs)) {
|
|
1230
|
+
throw new Exception(SR_inputSequenceEmpty + " (Parameter \'source\')");
|
|
1231
|
+
}
|
|
1232
|
+
const len = xs.length | 0;
|
|
1233
|
+
return initialize(count, (_arg) => {
|
|
1234
|
+
const r = randomizer();
|
|
1235
|
+
if ((r < 0) ? true : (r >= 1)) {
|
|
1236
|
+
throw new Exception(SR_Arg_ArgumentOutOfRangeException + " (Parameter \'randomizer\')");
|
|
1237
|
+
}
|
|
1238
|
+
return item_2(~~(r * len), xs);
|
|
1239
|
+
}, cons);
|
|
1240
|
+
}
|
|
1241
|
+
export function randomChoicesWith(random, count, xs, cons) {
|
|
1242
|
+
return randomChoicesBy(() => random.NextDouble(), count, xs, cons);
|
|
1243
|
+
}
|
|
1244
|
+
export function randomChoices(count, xs, cons) {
|
|
1245
|
+
return randomChoicesWith(nonSeeded(), count, xs, cons);
|
|
1246
|
+
}
|
|
1247
|
+
export function randomSampleBy(randomizer, count, xs) {
|
|
1248
|
+
if (count < 0) {
|
|
1249
|
+
throw new Exception(SR_inputMustBeNonNegative + " (Parameter \'count\')");
|
|
1250
|
+
}
|
|
1251
|
+
const arr = copy(xs);
|
|
1252
|
+
const len = arr.length | 0;
|
|
1253
|
+
if ((len === 0) && (count > 0)) {
|
|
1254
|
+
throw new Exception(SR_inputSequenceEmpty + " (Parameter \'source\')");
|
|
1255
|
+
}
|
|
1256
|
+
if (count > len) {
|
|
1257
|
+
throw new Exception(SR_notEnoughElements + " (Parameter \'count\')");
|
|
1258
|
+
}
|
|
1259
|
+
for (let i = 0; i <= (count - 1); i++) {
|
|
1260
|
+
const r = randomizer();
|
|
1261
|
+
if ((r < 0) ? true : (r >= 1)) {
|
|
1262
|
+
throw new Exception(SR_Arg_ArgumentOutOfRangeException + " (Parameter \'randomizer\')");
|
|
1263
|
+
}
|
|
1264
|
+
const j = (i + ~~(r * (len - i))) | 0;
|
|
1265
|
+
const tmp = item_2(i, arr);
|
|
1266
|
+
setItem_1(arr, i, item_2(j, arr));
|
|
1267
|
+
setItem_1(arr, j, tmp);
|
|
1268
|
+
}
|
|
1269
|
+
return getSubArray(arr, 0, count);
|
|
1270
|
+
}
|
|
1271
|
+
export function randomSampleWith(random, count, xs) {
|
|
1272
|
+
return randomSampleBy(() => random.NextDouble(), count, xs);
|
|
1273
|
+
}
|
|
1274
|
+
export function randomSample(count, xs) {
|
|
1275
|
+
return randomSampleWith(nonSeeded(), count, xs);
|
|
1276
|
+
}
|
|
1171
1277
|
export function removeAt(index, xs) {
|
|
1172
1278
|
if ((index < 0) ? true : (index >= xs.length)) {
|
|
1173
|
-
throw new
|
|
1279
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1174
1280
|
}
|
|
1175
1281
|
let i = -1;
|
|
1176
1282
|
return filter((_arg) => {
|
|
@@ -1202,14 +1308,14 @@ export function removeManyAt(index, count, xs) {
|
|
|
1202
1308
|
}, xs);
|
|
1203
1309
|
const status_1 = (((status === 0) && ((i + 1) === (index + count))) ? 1 : status) | 0;
|
|
1204
1310
|
if (status_1 < 1) {
|
|
1205
|
-
throw new
|
|
1311
|
+
throw new Exception(SR_indexOutOfBounds + ((" (Parameter \'" + ((status_1 < 0) ? "index" : "count")) + "\')"));
|
|
1206
1312
|
}
|
|
1207
1313
|
return ys;
|
|
1208
1314
|
}
|
|
1209
1315
|
export function updateAt(index, y, xs, cons) {
|
|
1210
1316
|
const len = xs.length | 0;
|
|
1211
1317
|
if ((index < 0) ? true : (index >= len)) {
|
|
1212
|
-
throw new
|
|
1318
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1213
1319
|
}
|
|
1214
1320
|
const target = Helpers_allocateArrayFromCons(cons, len);
|
|
1215
1321
|
for (let i = 0; i <= (len - 1); i++) {
|
|
@@ -1218,12 +1324,12 @@ export function updateAt(index, y, xs, cons) {
|
|
|
1218
1324
|
return target;
|
|
1219
1325
|
}
|
|
1220
1326
|
export function resize(xs, newSize, zero, cons) {
|
|
1221
|
-
let array, array_1, start_2, count_2;
|
|
1327
|
+
let array = undefined, array_1 = undefined, start_2 = undefined, count_2 = undefined;
|
|
1222
1328
|
if (newSize < 0) {
|
|
1223
|
-
throw new
|
|
1329
|
+
throw new Exception("The input must be non-negative. (Parameter \'newSize\')");
|
|
1224
1330
|
}
|
|
1225
1331
|
const zero_1 = defaultArg(zero, defaultOf());
|
|
1226
|
-
if (xs.contents
|
|
1332
|
+
if (Operators_IsNull(xs.contents)) {
|
|
1227
1333
|
xs.contents = ((array = Helpers_allocateArrayFromCons(cons, newSize), array.fill(zero_1, 0, (0 + newSize))));
|
|
1228
1334
|
}
|
|
1229
1335
|
else {
|