@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,3 +1,9 @@
|
|
|
1
|
+
import { Exception } from "./Util.js";
|
|
2
|
+
export const UriKind = {
|
|
3
|
+
RelativeOrAbsolute: 0,
|
|
4
|
+
Absolute: 1,
|
|
5
|
+
Relative: 2,
|
|
6
|
+
};
|
|
1
7
|
const ok = (value) => ({
|
|
2
8
|
tag: "ok",
|
|
3
9
|
value,
|
|
@@ -9,7 +15,6 @@ export class Uri {
|
|
|
9
15
|
}
|
|
10
16
|
static isAbsoluteUri(uri) {
|
|
11
17
|
try {
|
|
12
|
-
// tslint:disable-next-line no-unused-expression
|
|
13
18
|
new URL(uri);
|
|
14
19
|
return true;
|
|
15
20
|
}
|
|
@@ -19,41 +24,41 @@ export class Uri {
|
|
|
19
24
|
}
|
|
20
25
|
static tryCreateWithKind(uri, kind) {
|
|
21
26
|
switch (kind) {
|
|
22
|
-
case
|
|
27
|
+
case UriKind.Absolute:
|
|
23
28
|
return Uri.isAbsoluteUri(uri)
|
|
24
29
|
? ok(new Uri({ original: uri, value: new URL(uri), kind }))
|
|
25
30
|
: error("Invalid URI: The format of the URI could not be determined.");
|
|
26
|
-
case
|
|
31
|
+
case UriKind.Relative:
|
|
27
32
|
return Uri.isAbsoluteUri(uri)
|
|
28
33
|
? error("URI is not a relative path.")
|
|
29
34
|
: ok(new Uri({ original: uri, value: uri, kind }));
|
|
30
|
-
case
|
|
35
|
+
case UriKind.RelativeOrAbsolute:
|
|
31
36
|
return Uri.isAbsoluteUri(uri)
|
|
32
|
-
? ok(new Uri({ original: uri, value: new URL(uri), kind:
|
|
33
|
-
: ok(new Uri({ original: uri, value: uri, kind:
|
|
37
|
+
? ok(new Uri({ original: uri, value: new URL(uri), kind: UriKind.Absolute }))
|
|
38
|
+
: ok(new Uri({ original: uri, value: uri, kind: UriKind.Relative }));
|
|
34
39
|
default:
|
|
35
40
|
const never = kind;
|
|
36
41
|
return never;
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
44
|
static tryCreateWithBase(baseUri, relativeUri) {
|
|
40
|
-
return baseUri.uri.kind !==
|
|
45
|
+
return baseUri.uri.kind !== UriKind.Absolute
|
|
41
46
|
? error("Base URI should have Absolute kind")
|
|
42
47
|
: typeof relativeUri === "string"
|
|
43
48
|
? ok(new Uri({
|
|
44
49
|
original: new URL(relativeUri, baseUri.uri.value).toString(),
|
|
45
50
|
value: new URL(relativeUri, baseUri.uri.value),
|
|
46
|
-
kind:
|
|
51
|
+
kind: UriKind.Absolute,
|
|
47
52
|
}))
|
|
48
|
-
: relativeUri.uri.kind ===
|
|
53
|
+
: relativeUri.uri.kind === UriKind.Relative
|
|
49
54
|
? ok(new Uri({
|
|
50
55
|
original: new URL(relativeUri.uri.value, baseUri.uri.value).toString(),
|
|
51
56
|
value: new URL(relativeUri.uri.value, baseUri.uri.value),
|
|
52
|
-
kind:
|
|
57
|
+
kind: UriKind.Absolute,
|
|
53
58
|
}))
|
|
54
59
|
: ok(baseUri);
|
|
55
60
|
}
|
|
56
|
-
static tryCreateImpl(value, kindOrUri =
|
|
61
|
+
static tryCreateImpl(value, kindOrUri = UriKind.Absolute) {
|
|
57
62
|
return typeof value === "string"
|
|
58
63
|
? typeof kindOrUri !== "number"
|
|
59
64
|
? error("Kind must be specified when the baseUri is a string.")
|
|
@@ -62,19 +67,19 @@ export class Uri {
|
|
|
62
67
|
? error("Kind should not be specified when the baseUri is an absolute Uri.")
|
|
63
68
|
: Uri.tryCreateWithBase(value, kindOrUri);
|
|
64
69
|
}
|
|
65
|
-
static create(value, kindOrUri =
|
|
70
|
+
static create(value, kindOrUri = UriKind.Absolute) {
|
|
66
71
|
const result = Uri.tryCreateImpl(value, kindOrUri);
|
|
67
72
|
switch (result.tag) {
|
|
68
73
|
case "ok":
|
|
69
74
|
return result.value;
|
|
70
75
|
case "error":
|
|
71
|
-
throw new
|
|
76
|
+
throw new Exception(result.error);
|
|
72
77
|
default:
|
|
73
78
|
const never = result;
|
|
74
79
|
return never;
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
|
-
static tryCreate(value, kindOrUri =
|
|
82
|
+
static tryCreate(value, kindOrUri = UriKind.Absolute, out) {
|
|
78
83
|
const result = Uri.tryCreateImpl(value, kindOrUri);
|
|
79
84
|
switch (result.tag) {
|
|
80
85
|
case "ok":
|
|
@@ -89,9 +94,9 @@ export class Uri {
|
|
|
89
94
|
}
|
|
90
95
|
toString() {
|
|
91
96
|
switch (this.uri.kind) {
|
|
92
|
-
case
|
|
97
|
+
case UriKind.Absolute:
|
|
93
98
|
return decodeURIComponent(this.asUrl().toString());
|
|
94
|
-
case
|
|
99
|
+
case UriKind.Relative:
|
|
95
100
|
return this.uri.value;
|
|
96
101
|
default:
|
|
97
102
|
const never = this.uri;
|
|
@@ -100,17 +105,17 @@ export class Uri {
|
|
|
100
105
|
}
|
|
101
106
|
asUrl() {
|
|
102
107
|
switch (this.uri.kind) {
|
|
103
|
-
case
|
|
108
|
+
case UriKind.Absolute:
|
|
104
109
|
return this.uri.value;
|
|
105
|
-
case
|
|
106
|
-
throw new
|
|
110
|
+
case UriKind.Relative:
|
|
111
|
+
throw new Exception("This operation is not supported for a relative URI.");
|
|
107
112
|
default:
|
|
108
113
|
const never = this.uri;
|
|
109
114
|
return never;
|
|
110
115
|
}
|
|
111
116
|
}
|
|
112
117
|
get isAbsoluteUri() {
|
|
113
|
-
return this.uri.kind ===
|
|
118
|
+
return this.uri.kind === UriKind.Absolute;
|
|
114
119
|
}
|
|
115
120
|
get absoluteUri() {
|
|
116
121
|
return this.asUrl().href;
|
|
@@ -120,7 +125,13 @@ export class Uri {
|
|
|
120
125
|
return protocol.slice(0, protocol.length - 1);
|
|
121
126
|
}
|
|
122
127
|
get host() {
|
|
123
|
-
|
|
128
|
+
const host = this.asUrl().host;
|
|
129
|
+
if (host.includes(":")) {
|
|
130
|
+
return host.split(":")[0];
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
return host;
|
|
134
|
+
}
|
|
124
135
|
}
|
|
125
136
|
get absolutePath() {
|
|
126
137
|
return this.asUrl().pathname;
|
|
@@ -128,6 +139,18 @@ export class Uri {
|
|
|
128
139
|
get query() {
|
|
129
140
|
return this.asUrl().search;
|
|
130
141
|
}
|
|
142
|
+
get isDefaultPort() {
|
|
143
|
+
return this.port === 80;
|
|
144
|
+
}
|
|
145
|
+
get port() {
|
|
146
|
+
const port = this.asUrl().port;
|
|
147
|
+
if (port === "") {
|
|
148
|
+
return 80;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
return parseInt(port);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
131
154
|
get pathAndQuery() {
|
|
132
155
|
const url = this.asUrl();
|
|
133
156
|
return url.pathname + url.search;
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Don't change, this corresponds to DateTimeKind.Kind enum values in .NET
|
|
2
|
+
export const DateTimeKind = {
|
|
3
|
+
Unspecified: 0,
|
|
4
|
+
Utc: 1,
|
|
5
|
+
Local: 2,
|
|
6
|
+
};
|
|
7
|
+
// Exception is intentionally not derived from Error, for performance reasons (see #2160)
|
|
8
|
+
export class Exception {
|
|
9
|
+
constructor(msg, innerException) {
|
|
10
|
+
this.message = msg ?? "";
|
|
11
|
+
this.innerException = innerException;
|
|
12
|
+
}
|
|
13
|
+
toString() {
|
|
14
|
+
return this.message;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function isException(x) {
|
|
18
|
+
return x instanceof Exception || x instanceof Error;
|
|
19
|
+
}
|
|
20
|
+
export function isPromise(x) {
|
|
21
|
+
return x instanceof Promise;
|
|
22
|
+
}
|
|
23
|
+
export function ensureErrorOrException(e) {
|
|
24
|
+
// Exceptionally admitting promises as errors for compatibility with React.suspense (see #3298)
|
|
25
|
+
return (isException(e) || isPromise(e)) ? e : new Exception(String(e));
|
|
26
|
+
}
|
|
2
27
|
export function isArrayLike(x) {
|
|
3
28
|
return Array.isArray(x) || ArrayBuffer.isView(x);
|
|
4
29
|
}
|
|
30
|
+
export function isMutableArray(x) {
|
|
31
|
+
return Array.isArray(x) || ArrayBuffer.isView(x);
|
|
32
|
+
}
|
|
5
33
|
export function isIterable(x) {
|
|
6
34
|
return x != null && typeof x === "object" && Symbol.iterator in x;
|
|
7
35
|
}
|
|
@@ -35,9 +63,7 @@ export function sameConstructor(x, y) {
|
|
|
35
63
|
return Object.getPrototypeOf(x)?.constructor === Object.getPrototypeOf(y)?.constructor;
|
|
36
64
|
}
|
|
37
65
|
export class Enumerable {
|
|
38
|
-
constructor(en) {
|
|
39
|
-
this.en = en;
|
|
40
|
-
}
|
|
66
|
+
constructor(en) { this.en = en; }
|
|
41
67
|
GetEnumerator() { return this.en; }
|
|
42
68
|
"System.Collections.IEnumerable.GetEnumerator"() { return this.en; }
|
|
43
69
|
[Symbol.iterator]() {
|
|
@@ -51,8 +77,8 @@ export class Enumerable {
|
|
|
51
77
|
}
|
|
52
78
|
export class Enumerator {
|
|
53
79
|
constructor(iter) {
|
|
54
|
-
this.iter = iter;
|
|
55
80
|
this.current = defaultOf();
|
|
81
|
+
this.iter = iter;
|
|
56
82
|
}
|
|
57
83
|
["System.Collections.Generic.IEnumerator`1.get_Current"]() {
|
|
58
84
|
return this.current;
|
|
@@ -66,7 +92,7 @@ export class Enumerator {
|
|
|
66
92
|
return !cur.done;
|
|
67
93
|
}
|
|
68
94
|
["System.Collections.IEnumerator.Reset"]() {
|
|
69
|
-
throw new
|
|
95
|
+
throw new Exception("JS iterators cannot be reset");
|
|
70
96
|
}
|
|
71
97
|
Dispose() {
|
|
72
98
|
return;
|
|
@@ -125,7 +151,7 @@ export function comparerFromEqualityComparer(comparer) {
|
|
|
125
151
|
}
|
|
126
152
|
export function assertEqual(actual, expected, msg) {
|
|
127
153
|
if (!equals(actual, expected)) {
|
|
128
|
-
throw Object.assign(new
|
|
154
|
+
throw Object.assign(new Exception(msg || `Expected: ${expected} - Actual: ${actual}`), {
|
|
129
155
|
actual,
|
|
130
156
|
expected,
|
|
131
157
|
});
|
|
@@ -133,7 +159,7 @@ export function assertEqual(actual, expected, msg) {
|
|
|
133
159
|
}
|
|
134
160
|
export function assertNotEqual(actual, expected, msg) {
|
|
135
161
|
if (equals(actual, expected)) {
|
|
136
|
-
throw Object.assign(new
|
|
162
|
+
throw Object.assign(new Exception(msg || `Expected: ${expected} - Actual: ${actual}`), {
|
|
137
163
|
actual,
|
|
138
164
|
expected,
|
|
139
165
|
});
|
|
@@ -168,7 +194,7 @@ export function dateOffset(date) {
|
|
|
168
194
|
const date1 = date;
|
|
169
195
|
return typeof date1.offset === "number"
|
|
170
196
|
? date1.offset
|
|
171
|
-
: (date.kind ===
|
|
197
|
+
: (date.kind === DateTimeKind.Utc
|
|
172
198
|
? 0 : date.getTimezoneOffset() * -60000);
|
|
173
199
|
}
|
|
174
200
|
export function int16ToString(i, radix) {
|
|
@@ -334,7 +360,7 @@ function equalObjects(x, y) {
|
|
|
334
360
|
}
|
|
335
361
|
return true;
|
|
336
362
|
}
|
|
337
|
-
export function
|
|
363
|
+
export function physicalEquals(x, y) {
|
|
338
364
|
return x === y;
|
|
339
365
|
}
|
|
340
366
|
export function equals(x, y) {
|
|
@@ -378,7 +404,18 @@ export function compareDates(x, y) {
|
|
|
378
404
|
return xtime === ytime ? 0 : (xtime < ytime ? -1 : 1);
|
|
379
405
|
}
|
|
380
406
|
export function comparePrimitives(x, y) {
|
|
381
|
-
|
|
407
|
+
if (x === y) {
|
|
408
|
+
return 0;
|
|
409
|
+
}
|
|
410
|
+
if (x < y) {
|
|
411
|
+
return -1;
|
|
412
|
+
}
|
|
413
|
+
if (x > y) {
|
|
414
|
+
return 1;
|
|
415
|
+
}
|
|
416
|
+
// Neither equal nor ordered: at least one operand is NaN.
|
|
417
|
+
// Match .NET Double.CompareTo: NaN equals NaN and is less than any other value.
|
|
418
|
+
return Number.isNaN(x) ? (Number.isNaN(y) ? 0 : -1) : 1;
|
|
382
419
|
}
|
|
383
420
|
export function compareArraysWith(x, y, comp) {
|
|
384
421
|
if (x == null) {
|
|
@@ -440,7 +477,7 @@ export function compare(x, y) {
|
|
|
440
477
|
return isArrayLike(y) ? compareArrays(x, y) : -1;
|
|
441
478
|
}
|
|
442
479
|
else if (typeof x !== "object") {
|
|
443
|
-
return x
|
|
480
|
+
return comparePrimitives(x, y);
|
|
444
481
|
}
|
|
445
482
|
else if (x instanceof Date) {
|
|
446
483
|
return y instanceof Date ? compareDates(x, y) : -1;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// Adapted from https://github.com/MikeMcl/big.js/blob/0f94dc9110d55c4f324a47ba6a2e832ce23ac589/big.mjs
|
|
2
|
-
/* tslint:disable */
|
|
3
2
|
var P = {};
|
|
4
3
|
/*
|
|
5
4
|
* big.js v6.0.3
|
|
@@ -211,6 +210,9 @@ function round(x, sd, rm, more) {
|
|
|
211
210
|
}
|
|
212
211
|
return x;
|
|
213
212
|
}
|
|
213
|
+
function hasNonzeroDigit(x) {
|
|
214
|
+
return x.c.some(d => d !== 0);
|
|
215
|
+
}
|
|
214
216
|
/*
|
|
215
217
|
* Return a string representing the value of Big x in normal or exponential notation.
|
|
216
218
|
* Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.
|
|
@@ -729,7 +731,7 @@ P.times = P.mul = function (y) {
|
|
|
729
731
|
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
730
732
|
*/
|
|
731
733
|
P.toExponential = function (dp, rm) {
|
|
732
|
-
var x = this, n = x
|
|
734
|
+
var x = this, n = hasNonzeroDigit(x);
|
|
733
735
|
if (dp !== UNDEFINED) {
|
|
734
736
|
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
735
737
|
throw Error(INVALID_DP);
|
|
@@ -738,7 +740,7 @@ P.toExponential = function (dp, rm) {
|
|
|
738
740
|
for (; x.c.length < dp;)
|
|
739
741
|
x.c.push(0);
|
|
740
742
|
}
|
|
741
|
-
return stringify(x, true,
|
|
743
|
+
return stringify(x, true, n);
|
|
742
744
|
};
|
|
743
745
|
/*
|
|
744
746
|
* Return a string representing the value of this Big in normal notation rounded to dp fixed
|
|
@@ -747,21 +749,22 @@ P.toExponential = function (dp, rm) {
|
|
|
747
749
|
* dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.
|
|
748
750
|
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
749
751
|
*
|
|
750
|
-
*
|
|
751
|
-
* (-0).toFixed(
|
|
752
|
+
* Unlike JavaScript, the sign is omitted when the rounded result is zero:
|
|
753
|
+
* (-0.1).toFixed(0) is '0' and (-0.01).toFixed(1) is '0.0', matching .NET.
|
|
752
754
|
*/
|
|
753
755
|
P.toFixed = function (dp, rm) {
|
|
754
|
-
var x = this
|
|
756
|
+
var x = this;
|
|
755
757
|
if (dp !== UNDEFINED) {
|
|
756
758
|
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
757
759
|
throw Error(INVALID_DP);
|
|
758
760
|
}
|
|
759
|
-
x =
|
|
761
|
+
x = new x.constructor(x);
|
|
762
|
+
x = round(x, dp + x.e + 1, rm);
|
|
760
763
|
// x.e may have changed if the value is rounded up.
|
|
761
764
|
for (dp = dp + x.e + 1; x.c.length < dp;)
|
|
762
765
|
x.c.push(0);
|
|
763
766
|
}
|
|
764
|
-
return stringify(x, false,
|
|
767
|
+
return stringify(x, false, hasNonzeroDigit(x));
|
|
765
768
|
};
|
|
766
769
|
/*
|
|
767
770
|
* Return a string representing the value of this Big.
|
|
@@ -771,7 +774,7 @@ P.toFixed = function (dp, rm) {
|
|
|
771
774
|
*/
|
|
772
775
|
P.toJSON = P.toString = function () {
|
|
773
776
|
var x = this, Big = x.constructor;
|
|
774
|
-
return stringify(x, x.e <= Big.NE || x.e >= Big.PE,
|
|
777
|
+
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, hasNonzeroDigit(x));
|
|
775
778
|
};
|
|
776
779
|
/*
|
|
777
780
|
* Return the value of this Big as a primitve number.
|
|
@@ -793,7 +796,7 @@ P.toNumber = function () {
|
|
|
793
796
|
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
794
797
|
*/
|
|
795
798
|
P.toPrecision = function (sd, rm) {
|
|
796
|
-
var x = this, Big = x.constructor, n = x
|
|
799
|
+
var x = this, Big = x.constructor, n = hasNonzeroDigit(x);
|
|
797
800
|
if (sd !== UNDEFINED) {
|
|
798
801
|
if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {
|
|
799
802
|
throw Error(INVALID + 'precision');
|
|
@@ -802,7 +805,7 @@ P.toPrecision = function (sd, rm) {
|
|
|
802
805
|
for (; x.c.length < sd;)
|
|
803
806
|
x.c.push(0);
|
|
804
807
|
}
|
|
805
|
-
return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE,
|
|
808
|
+
return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, n);
|
|
806
809
|
};
|
|
807
810
|
/*
|
|
808
811
|
* Return a string representing the value of this Big.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sideEffects": false,
|
|
3
|
+
"private": false,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"name": "@fable-org/fable-library-js",
|
|
6
|
+
"version": "2.7.1",
|
|
7
|
+
"description": "Core library used by F# projects compiled with fable.io",
|
|
8
|
+
"author": "Fable Contributors",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/fable-compiler/Fable.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/fable-compiler/Fable/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://fable.io",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"fable",
|
|
20
|
+
"fable-compiler",
|
|
21
|
+
"fsharp",
|
|
22
|
+
"F#"
|
|
23
|
+
]
|
|
24
|
+
}
|