@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
|
@@ -7,29 +7,27 @@ open System
|
|
|
7
7
|
module AsyncOptionCE =
|
|
8
8
|
type AsyncOptionBuilder() =
|
|
9
9
|
|
|
10
|
-
member inline _.Return(value: 'value) : Async<'value option> = AsyncOption.
|
|
10
|
+
member inline _.Return(value: 'value) : Async<'value option> = AsyncOption.some value
|
|
11
11
|
|
|
12
12
|
member inline _.ReturnFrom(value: Async<'value option>) : Async<'value option> = value
|
|
13
13
|
|
|
14
14
|
member inline _.Zero() : Async<unit option> =
|
|
15
|
-
|
|
15
|
+
Some()
|
|
16
16
|
|> async.Return
|
|
17
17
|
|
|
18
18
|
member inline _.Bind
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
(input: Async<'input option>, [<InlineIfLambda>] binder: 'input -> Async<'output option>) : Async<
|
|
20
|
+
'output option
|
|
21
|
+
>
|
|
22
|
+
=
|
|
23
23
|
AsyncOption.bind binder input
|
|
24
24
|
|
|
25
25
|
member inline _.Delay(generator: unit -> Async<'value option>) : Async<'value option> =
|
|
26
26
|
async.Delay generator
|
|
27
27
|
|
|
28
28
|
member inline this.Combine
|
|
29
|
-
(
|
|
30
|
-
|
|
31
|
-
computation2: Async<_ option>
|
|
32
|
-
) : Async<_ option> =
|
|
29
|
+
(computation1: Async<_ option>, computation2: Async<_ option>)
|
|
30
|
+
: Async<_ option> =
|
|
33
31
|
this.Bind(computation1, (fun () -> computation2))
|
|
34
32
|
|
|
35
33
|
member inline _.TryWith
|
|
@@ -40,20 +38,13 @@ module AsyncOptionCE =
|
|
|
40
38
|
async.TryWith(computation, handler)
|
|
41
39
|
|
|
42
40
|
member inline _.TryFinally
|
|
43
|
-
(
|
|
44
|
-
|
|
45
|
-
[<InlineIfLambda>] compensation: unit -> unit
|
|
46
|
-
) : Async<'value option> =
|
|
41
|
+
(computation: Async<'value option>, [<InlineIfLambda>] compensation: unit -> unit)
|
|
42
|
+
: Async<'value option> =
|
|
47
43
|
async.TryFinally(computation, compensation)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
#if NETSTANDARD2_1
|
|
51
|
-
|
|
44
|
+
#if !FABLE_COMPILER
|
|
52
45
|
member inline _.TryFinallyAsync
|
|
53
|
-
(
|
|
54
|
-
|
|
55
|
-
[<InlineIfLambda>] compensation: unit -> ValueTask
|
|
56
|
-
) : Async<'value option> =
|
|
46
|
+
(computation: Async<'value option>, [<InlineIfLambda>] compensation: unit -> ValueTask)
|
|
47
|
+
: Async<'value option> =
|
|
57
48
|
let compensation =
|
|
58
49
|
async {
|
|
59
50
|
let vTask = compensation ()
|
|
@@ -86,10 +77,8 @@ module AsyncOptionCE =
|
|
|
86
77
|
#endif
|
|
87
78
|
|
|
88
79
|
member this.While
|
|
89
|
-
(
|
|
90
|
-
|
|
91
|
-
computation: Async<unit option>
|
|
92
|
-
) : Async<unit option> =
|
|
80
|
+
(guard: unit -> bool, computation: Async<unit option>)
|
|
81
|
+
: Async<unit option> =
|
|
93
82
|
if not (guard ()) then
|
|
94
83
|
this.Zero()
|
|
95
84
|
else
|
|
@@ -103,15 +92,6 @@ module AsyncOptionCE =
|
|
|
103
92
|
/// </summary>
|
|
104
93
|
member inline _.Source(async: Async<'value option>) : Async<'value option> = async
|
|
105
94
|
|
|
106
|
-
#if !FABLE_COMPILER
|
|
107
|
-
/// <summary>
|
|
108
|
-
/// Method lets us transform data types into our internal representation.
|
|
109
|
-
/// </summary>
|
|
110
|
-
member inline _.Source(task: Task<'value option>) : Async<'value option> =
|
|
111
|
-
task
|
|
112
|
-
|> Async.AwaitTask
|
|
113
|
-
|
|
114
|
-
#endif
|
|
115
95
|
|
|
116
96
|
let asyncOption = AsyncOptionBuilder()
|
|
117
97
|
|
|
@@ -154,10 +134,8 @@ module AsyncOptionCEExtensions =
|
|
|
154
134
|
)
|
|
155
135
|
|
|
156
136
|
member inline this.For
|
|
157
|
-
(
|
|
158
|
-
|
|
159
|
-
binder: 'input -> Async<unit option>
|
|
160
|
-
) : Async<unit option> =
|
|
137
|
+
(sequence: #seq<'input>, binder: 'input -> Async<unit option>)
|
|
138
|
+
: Async<unit option> =
|
|
161
139
|
this.Using(
|
|
162
140
|
sequence.GetEnumerator(),
|
|
163
141
|
fun enum -> this.While(enum.MoveNext, this.Delay(fun () -> binder enum.Current))
|
|
@@ -180,4 +158,17 @@ module AsyncOptionCEExtensions =
|
|
|
180
158
|
a
|
|
181
159
|
|> Async.AwaitTask
|
|
182
160
|
|> Async.map Some
|
|
161
|
+
|
|
162
|
+
[<AutoOpen>]
|
|
163
|
+
module AsyncOptionCEExtensionsHigher =
|
|
164
|
+
|
|
165
|
+
type AsyncOptionBuilder with
|
|
166
|
+
|
|
167
|
+
/// <summary>
|
|
168
|
+
/// Method lets us transform data types into our internal representation.
|
|
169
|
+
/// </summary>
|
|
170
|
+
member inline _.Source(task: Task<'value option>) : Async<'value option> =
|
|
171
|
+
task
|
|
172
|
+
|> Async.AwaitTask
|
|
173
|
+
|
|
183
174
|
#endif
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
|
|
3
|
+
import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
|
|
4
|
+
import { value as value_2, some } from "../fable-library-js.5.17.2/Option.js";
|
|
4
5
|
|
|
5
6
|
export class AsyncOptionCE_AsyncOptionBuilder {
|
|
6
7
|
constructor() {
|
|
@@ -8,7 +9,7 @@ export class AsyncOptionCE_AsyncOptionBuilder {
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export function AsyncOptionCE_AsyncOptionBuilder_$reflection() {
|
|
11
|
-
return class_type("FsToolkit.ErrorHandling.AsyncOptionCE.AsyncOptionBuilder",
|
|
12
|
+
return class_type("FsToolkit.ErrorHandling.AsyncOptionCE.AsyncOptionBuilder", undefined, AsyncOptionCE_AsyncOptionBuilder);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export function AsyncOptionCE_AsyncOptionBuilder_$ctor() {
|
|
@@ -17,15 +18,15 @@ export function AsyncOptionCE_AsyncOptionBuilder_$ctor() {
|
|
|
17
18
|
|
|
18
19
|
export function AsyncOptionCE_AsyncOptionBuilder__While_78DDE493(this$, guard, computation) {
|
|
19
20
|
if (!guard()) {
|
|
20
|
-
return singleton.Return(some(
|
|
21
|
+
return singleton.Return(some(undefined));
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
|
-
return singleton.Bind(computation, (
|
|
24
|
-
if (
|
|
25
|
-
return singleton.Return(
|
|
24
|
+
return singleton.Bind(computation, (x) => {
|
|
25
|
+
if (x == null) {
|
|
26
|
+
return singleton.Return(undefined);
|
|
26
27
|
}
|
|
27
28
|
else {
|
|
28
|
-
|
|
29
|
+
value_2(x);
|
|
29
30
|
return AsyncOptionCE_AsyncOptionBuilder__While_78DDE493(this$, guard, computation);
|
|
30
31
|
}
|
|
31
32
|
});
|
|
@@ -34,4 +35,3 @@ export function AsyncOptionCE_AsyncOptionBuilder__While_78DDE493(this$, guard, c
|
|
|
34
35
|
|
|
35
36
|
export const AsyncOptionCE_asyncOption = AsyncOptionCE_AsyncOptionBuilder_$ctor();
|
|
36
37
|
|
|
37
|
-
//# sourceMappingURL=AsyncOptionCE.fs.js.map
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
namespace FsToolkit.ErrorHandling
|
|
2
2
|
|
|
3
3
|
open System.Threading.Tasks
|
|
4
|
+
#if !FABLE_COMPILER
|
|
5
|
+
open System.Runtime.ExceptionServices
|
|
6
|
+
#endif
|
|
4
7
|
|
|
5
8
|
[<RequireQualifiedAccess>]
|
|
6
9
|
module AsyncResult =
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
let inline retn (value: 'ok) : Async<Result<'ok, 'error>> =
|
|
11
|
+
let inline ok (value: 'ok) : Async<Result<'ok, 'error>> =
|
|
10
12
|
Ok value
|
|
11
13
|
|> Async.singleton
|
|
12
14
|
|
|
13
|
-
let inline
|
|
14
|
-
|
|
15
|
-
let inline returnError (error: 'error) : Async<Result<'ok, 'error>> =
|
|
15
|
+
let inline error (error: 'error) : Async<Result<'ok, 'error>> =
|
|
16
16
|
Error error
|
|
17
17
|
|> Async.singleton
|
|
18
18
|
|
|
19
|
-
let inline error (error: 'error) : Async<Result<'ok, 'error>> = returnError error
|
|
20
|
-
|
|
21
19
|
let inline map
|
|
22
20
|
([<InlineIfLambda>] mapper: 'input -> 'output)
|
|
23
21
|
(input: Async<Result<'input, 'error>>)
|
|
@@ -34,7 +32,7 @@ module AsyncResult =
|
|
|
34
32
|
([<InlineIfLambda>] binder: 'input -> Async<Result<'output, 'error>>)
|
|
35
33
|
(input: Async<Result<'input, 'error>>)
|
|
36
34
|
: Async<Result<'output, 'error>> =
|
|
37
|
-
Async.bind (Result.either binder
|
|
35
|
+
Async.bind (Result.either binder error) input
|
|
38
36
|
|
|
39
37
|
let inline foldResult
|
|
40
38
|
([<InlineIfLambda>] onSuccess: 'input -> 'output)
|
|
@@ -160,6 +158,14 @@ module AsyncResult =
|
|
|
160
158
|
value
|
|
161
159
|
|> Async.map (Result.requireSome error)
|
|
162
160
|
|
|
161
|
+
// Converts an async-wrapped Option to a Result, using the given error factory if None.
|
|
162
|
+
let inline requireSomeWith
|
|
163
|
+
([<InlineIfLambda>] errorFactory: unit -> 'error)
|
|
164
|
+
(value: Async<'ok option>)
|
|
165
|
+
: Async<Result<'ok, 'error>> =
|
|
166
|
+
value
|
|
167
|
+
|> Async.map (Result.requireSomeWith errorFactory)
|
|
168
|
+
|
|
163
169
|
// Converts an async-wrapped Option to a Result, using the given error if Some.
|
|
164
170
|
let inline requireNone
|
|
165
171
|
(error: 'error)
|
|
@@ -168,6 +174,14 @@ module AsyncResult =
|
|
|
168
174
|
value
|
|
169
175
|
|> Async.map (Result.requireNone error)
|
|
170
176
|
|
|
177
|
+
// Converts an async-wrapped Option to a Result, using the given error factory if Some.
|
|
178
|
+
let inline requireNoneWith
|
|
179
|
+
([<InlineIfLambda>] errorFactory: unit -> 'error)
|
|
180
|
+
(value: Async<'ok option>)
|
|
181
|
+
: Async<Result<unit, 'error>> =
|
|
182
|
+
value
|
|
183
|
+
|> Async.map (Result.requireNoneWith errorFactory)
|
|
184
|
+
|
|
171
185
|
// Converts an async-wrapped ValueOption to a Result, using the given error if ValueNone.
|
|
172
186
|
let inline requireValueSome
|
|
173
187
|
(error: 'error)
|
|
@@ -224,6 +238,13 @@ module AsyncResult =
|
|
|
224
238
|
values
|
|
225
239
|
|> Async.map (Result.requireHead error)
|
|
226
240
|
|
|
241
|
+
|
|
242
|
+
/// Returns the async-wrapped result if it is Ok and the predicate is true, or if the async wrapped result is Error.
|
|
243
|
+
/// If the predicate is false, returns a new async-wrapped Error result with the error value.
|
|
244
|
+
let inline require predicate error result =
|
|
245
|
+
result
|
|
246
|
+
|> Async.map (Result.require predicate error)
|
|
247
|
+
|
|
227
248
|
/// Replaces an error value of an async-wrapped result with a custom error
|
|
228
249
|
/// value.
|
|
229
250
|
let inline setError
|
|
@@ -340,6 +361,20 @@ module AsyncResult =
|
|
|
340
361
|
| Choice2Of2 ex -> Error(exnMapper ex)
|
|
341
362
|
)
|
|
342
363
|
|
|
364
|
+
/// Gets the value in the Ok case or re-raises the exception in the Error case
|
|
365
|
+
let inline getOrReraise (input: Async<Result<'ok, exn>>) : Async<'ok> =
|
|
366
|
+
async {
|
|
367
|
+
match! input with
|
|
368
|
+
| Ok a -> return a
|
|
369
|
+
| Error exn ->
|
|
370
|
+
#if FABLE_COMPILER
|
|
371
|
+
return raise exn
|
|
372
|
+
#else
|
|
373
|
+
ExceptionDispatchInfo.Capture(exn).Throw()
|
|
374
|
+
return Unchecked.defaultof<_>
|
|
375
|
+
#endif
|
|
376
|
+
}
|
|
377
|
+
|
|
343
378
|
/// Lift Async to AsyncResult
|
|
344
379
|
let inline ofAsync (value: Async<'ok>) : Async<Result<'ok, 'error>> =
|
|
345
380
|
value
|
|
@@ -437,3 +472,12 @@ module AsyncResult =
|
|
|
437
472
|
Result.requireHead error
|
|
438
473
|
>> Async.singleton
|
|
439
474
|
)
|
|
475
|
+
|
|
476
|
+
/// Returns the async-wrapped result if it is Ok and the checkFunc returns an async-wrapped Ok result or if the async-wrapped result is Error.
|
|
477
|
+
/// If the checkFunc returns an async-wrapped Error result, returns the async-wrapped Error result.
|
|
478
|
+
let inline check ([<InlineIfLambda>] checkFunc) (result) =
|
|
479
|
+
result
|
|
480
|
+
|> bind (fun o ->
|
|
481
|
+
checkFunc o
|
|
482
|
+
|> map (fun _ -> o)
|
|
483
|
+
)
|
|
@@ -34,10 +34,8 @@ module AsyncResultCE =
|
|
|
34
34
|
async.Delay generator
|
|
35
35
|
|
|
36
36
|
member inline this.Combine
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
computation2: Async<Result<'ok, 'error>>
|
|
40
|
-
) : Async<Result<'ok, 'error>> =
|
|
37
|
+
(computation1: Async<Result<unit, 'error>>, computation2: Async<Result<'ok, 'error>>)
|
|
38
|
+
: Async<Result<'ok, 'error>> =
|
|
41
39
|
this.Bind(computation1, (fun () -> computation2))
|
|
42
40
|
|
|
43
41
|
member inline _.TryWith
|
|
@@ -48,14 +46,10 @@ module AsyncResultCE =
|
|
|
48
46
|
async.TryWith(computation, handler)
|
|
49
47
|
|
|
50
48
|
member inline _.TryFinally
|
|
51
|
-
(
|
|
52
|
-
|
|
53
|
-
[<InlineIfLambda>] compensation: unit -> unit
|
|
54
|
-
) : Async<Result<'ok, 'error>> =
|
|
49
|
+
(computation: Async<Result<'ok, 'error>>, [<InlineIfLambda>] compensation: unit -> unit)
|
|
50
|
+
: Async<Result<'ok, 'error>> =
|
|
55
51
|
async.TryFinally(computation, compensation)
|
|
56
|
-
|
|
57
|
-
#if NETSTANDARD2_1
|
|
58
|
-
|
|
52
|
+
#if !FABLE_COMPILER
|
|
59
53
|
member inline _.TryFinallyAsync
|
|
60
54
|
(
|
|
61
55
|
computation: Async<Result<'ok, 'error>>,
|
|
@@ -91,13 +85,9 @@ module AsyncResultCE =
|
|
|
91
85
|
)
|
|
92
86
|
)
|
|
93
87
|
#endif
|
|
94
|
-
|
|
95
|
-
|
|
96
88
|
member inline this.While
|
|
97
|
-
(
|
|
98
|
-
|
|
99
|
-
computation: Async<Result<unit, 'error>>
|
|
100
|
-
) : Async<Result<unit, 'error>> =
|
|
89
|
+
([<InlineIfLambda>] guard: unit -> bool, computation: Async<Result<unit, 'error>>)
|
|
90
|
+
: Async<Result<unit, 'error>> =
|
|
101
91
|
if guard () then
|
|
102
92
|
let mutable whileAsync = Unchecked.defaultof<_>
|
|
103
93
|
|
|
@@ -110,20 +100,10 @@ module AsyncResultCE =
|
|
|
110
100
|
|
|
111
101
|
|
|
112
102
|
member inline _.BindReturn
|
|
113
|
-
(
|
|
114
|
-
|
|
115
|
-
[<InlineIfLambda>] f: 'okInput -> 'okOutput
|
|
116
|
-
) : Async<Result<'okOutput, 'error>> =
|
|
103
|
+
(x: Async<Result<'okInput, 'error>>, [<InlineIfLambda>] f: 'okInput -> 'okOutput)
|
|
104
|
+
: Async<Result<'okOutput, 'error>> =
|
|
117
105
|
AsyncResult.map f x
|
|
118
106
|
|
|
119
|
-
member inline _.MergeSources
|
|
120
|
-
(
|
|
121
|
-
t1: Async<Result<'leftOk, 'error>>,
|
|
122
|
-
t2: Async<Result<'rightOk, 'error>>
|
|
123
|
-
) : Async<Result<'leftOk * 'rightOk, 'error>> =
|
|
124
|
-
AsyncResult.zip t1 t2
|
|
125
|
-
|
|
126
|
-
|
|
127
107
|
/// <summary>
|
|
128
108
|
/// Method lets us transform data types into our internal representation. This is the identity method to recognize the self type.
|
|
129
109
|
///
|
|
@@ -132,14 +112,6 @@ module AsyncResultCE =
|
|
|
132
112
|
member inline _.Source(result: Async<Result<'ok, 'error>>) : Async<Result<'ok, 'error>> =
|
|
133
113
|
result
|
|
134
114
|
|
|
135
|
-
#if !FABLE_COMPILER
|
|
136
|
-
/// <summary>
|
|
137
|
-
/// Method lets us transform data types into our internal representation.
|
|
138
|
-
/// </summary>
|
|
139
|
-
member inline _.Source(task: Task<Result<'ok, 'error>>) : Async<Result<'ok, 'error>> =
|
|
140
|
-
task
|
|
141
|
-
|> Async.AwaitTask
|
|
142
|
-
#endif
|
|
143
115
|
|
|
144
116
|
let asyncResult = AsyncResultBuilder()
|
|
145
117
|
|
|
@@ -177,17 +149,15 @@ module AsyncResultCEExtensions =
|
|
|
177
149
|
|
|
178
150
|
member inline _.Using
|
|
179
151
|
(
|
|
180
|
-
resource: 'ok :>
|
|
152
|
+
resource: 'ok :> IDisposableNull,
|
|
181
153
|
[<InlineIfLambda>] binder: 'ok -> Async<Result<'U, 'error>>
|
|
182
154
|
) : Async<Result<'U, 'error>> =
|
|
183
155
|
async.Using(resource, binder)
|
|
184
156
|
|
|
185
157
|
|
|
186
158
|
member inline this.For
|
|
187
|
-
(
|
|
188
|
-
|
|
189
|
-
[<InlineIfLambda>] binder: 'ok -> Async<Result<unit, 'error>>
|
|
190
|
-
) : Async<Result<unit, 'error>> =
|
|
159
|
+
(sequence: #seq<'ok>, [<InlineIfLambda>] binder: 'ok -> Async<Result<unit, 'error>>)
|
|
160
|
+
: Async<Result<unit, 'error>> =
|
|
191
161
|
this.Using(
|
|
192
162
|
sequence.GetEnumerator(),
|
|
193
163
|
fun enum ->
|
|
@@ -215,3 +185,17 @@ module AsyncResultCEExtensions =
|
|
|
215
185
|
|> Async.AwaitTask
|
|
216
186
|
|> Async.map Ok
|
|
217
187
|
#endif
|
|
188
|
+
|
|
189
|
+
#if !FABLE_COMPILER
|
|
190
|
+
[<AutoOpen>]
|
|
191
|
+
module AsyncResultCEExtensions2 =
|
|
192
|
+
|
|
193
|
+
type AsyncResultBuilder with
|
|
194
|
+
|
|
195
|
+
/// <summary>
|
|
196
|
+
/// Method lets us transform data types into our internal representation.
|
|
197
|
+
/// </summary>
|
|
198
|
+
member inline _.Source(task: Task<Result<'ok, 'error>>) : Async<Result<'ok, 'error>> =
|
|
199
|
+
task
|
|
200
|
+
|> Async.AwaitTask
|
|
201
|
+
#endif
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
|
|
2
3
|
|
|
3
4
|
export class AsyncResultCE_AsyncResultBuilder {
|
|
4
5
|
constructor() {
|
|
@@ -6,7 +7,7 @@ export class AsyncResultCE_AsyncResultBuilder {
|
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export function AsyncResultCE_AsyncResultBuilder_$reflection() {
|
|
9
|
-
return class_type("FsToolkit.ErrorHandling.AsyncResultCE.AsyncResultBuilder",
|
|
10
|
+
return class_type("FsToolkit.ErrorHandling.AsyncResultCE.AsyncResultBuilder", undefined, AsyncResultCE_AsyncResultBuilder);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export function AsyncResultCE_AsyncResultBuilder_$ctor() {
|
|
@@ -15,4 +16,3 @@ export function AsyncResultCE_AsyncResultBuilder_$ctor() {
|
|
|
15
16
|
|
|
16
17
|
export const AsyncResultCE_asyncResult = AsyncResultCE_AsyncResultBuilder_$ctor();
|
|
17
18
|
|
|
18
|
-
//# sourceMappingURL=AsyncResultCE.fs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
namespace FsToolkit.ErrorHandling
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
type AsyncResultOption<'ok, 'error> = Async<Result<
|
|
4
|
+
type AsyncResultOption<'ok, 'error> = Async<Result<'ok option, 'error>>
|
|
5
5
|
|
|
6
6
|
[<RequireQualifiedAccess>]
|
|
7
7
|
module AsyncResultOption =
|
|
@@ -20,10 +20,17 @@ module AsyncResultOption =
|
|
|
20
20
|
(fun opt ->
|
|
21
21
|
match opt with
|
|
22
22
|
| Some x -> binder x
|
|
23
|
-
| None -> AsyncResult.
|
|
23
|
+
| None -> AsyncResult.ok None
|
|
24
24
|
)
|
|
25
25
|
input
|
|
26
26
|
|
|
27
|
+
let inline ok x =
|
|
28
|
+
Ok(Some x)
|
|
29
|
+
|> Async.singleton
|
|
30
|
+
|
|
31
|
+
let inline error x : Async<Result<'ok option, 'error>> =
|
|
32
|
+
Error x
|
|
33
|
+
|> Async.singleton
|
|
27
34
|
|
|
28
35
|
let inline map2
|
|
29
36
|
([<InlineIfLambda>] mapper: 'okInput1 -> 'okInput2 -> 'okOutput)
|
|
@@ -40,7 +47,8 @@ module AsyncResultOption =
|
|
|
40
47
|
: Async<Result<'okOutput option, 'error>> =
|
|
41
48
|
AsyncResult.map3 (Option.map3 mapper) input1 input2 input3
|
|
42
49
|
|
|
43
|
-
let inline
|
|
50
|
+
let inline singleton (value: 'ok) : Async<Result<'ok option, 'error>> =
|
|
51
|
+
AsyncResult.ok (Some value)
|
|
44
52
|
|
|
45
53
|
let apply
|
|
46
54
|
(applier: Async<Result<('okInput -> 'okOutput) option, 'error>>)
|
|
@@ -48,12 +56,16 @@ module AsyncResultOption =
|
|
|
48
56
|
: Async<Result<'okOutput option, 'error>> =
|
|
49
57
|
map2 (fun f x -> f x) applier input
|
|
50
58
|
|
|
59
|
+
#if !FABLE_COMPILER_PYTHON
|
|
60
|
+
// https://github.com/fable-compiler/Fable/issues/4125
|
|
51
61
|
/// Replaces the wrapped value with unit
|
|
52
62
|
let ignore<'ok, 'error>
|
|
53
63
|
(value: Async<Result<'ok option, 'error>>)
|
|
54
64
|
: Async<Result<unit option, 'error>> =
|
|
55
65
|
value
|
|
56
66
|
|> map ignore<'ok>
|
|
67
|
+
#endif
|
|
68
|
+
|
|
57
69
|
|
|
58
70
|
let inline ofResult (r: Result<'ok, 'error>) =
|
|
59
71
|
r
|
|
@@ -65,11 +77,11 @@ module AsyncResultOption =
|
|
|
65
77
|
r
|
|
66
78
|
|> AsyncResult.map Some
|
|
67
79
|
|
|
68
|
-
let inline ofOption (r:
|
|
80
|
+
let inline ofOption (r: 'ok option) =
|
|
69
81
|
r
|
|
70
82
|
|> Ok
|
|
71
83
|
|> Async.singleton
|
|
72
84
|
|
|
73
|
-
let inline ofAsyncOption (r: Async<
|
|
85
|
+
let inline ofAsyncOption (r: Async<'ok option>) =
|
|
74
86
|
r
|
|
75
87
|
|> Async.map Ok
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
|
|
3
|
+
import { FSharpResult$2 } from "../fable-library-js.5.17.2/Result.js";
|
|
4
|
+
import { some, value as value_4 } from "../fable-library-js.5.17.2/Option.js";
|
|
5
|
+
|
|
6
|
+
export function AsyncResultOption_apply(applier, input) {
|
|
7
|
+
return singleton.Bind(applier, (x_3) => singleton.Bind(input, (y_2) => {
|
|
8
|
+
let copyOfStruct, copyOfStruct_1, input1_1, input2_1, x_1, y;
|
|
9
|
+
const value = (copyOfStruct = x_3, (copyOfStruct.tag === 1) ? (new FSharpResult$2(/* Error */ 1, [copyOfStruct.fields[0]])) : ((copyOfStruct_1 = y_2, (copyOfStruct_1.tag === 1) ? (new FSharpResult$2(/* Error */ 1, [copyOfStruct_1.fields[0]])) : (new FSharpResult$2(/* Ok */ 0, [(input1_1 = copyOfStruct.fields[0], (input2_1 = copyOfStruct_1.fields[0], (input1_1 != null) ? ((input2_1 != null) ? ((x_1 = input1_1, (y = value_4(input2_1), some(x_1(y))))) : undefined) : undefined))])))));
|
|
10
|
+
return singleton.Return(value);
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Replaces the wrapped value with unit
|
|
16
|
+
*/
|
|
17
|
+
export function AsyncResultOption_ignore(value) {
|
|
18
|
+
return singleton.Bind(value, (x$0027) => {
|
|
19
|
+
let input_2;
|
|
20
|
+
let value_2;
|
|
21
|
+
const input_4 = x$0027;
|
|
22
|
+
value_2 = ((input_4.tag === 1) ? (new FSharpResult$2(/* Error */ 1, [input_4.fields[0]])) : (new FSharpResult$2(/* Ok */ 0, [(input_2 = input_4.fields[0], (input_2 == null) ? undefined : some(void value_4(input_2)))])));
|
|
23
|
+
return singleton.Return(value_2);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -8,7 +8,7 @@ module AsyncResultOptionCE =
|
|
|
8
8
|
|
|
9
9
|
type AsyncResultOptionBuilder() =
|
|
10
10
|
member inline _.Return(value: 'ok) : AsyncResultOption<'ok, 'error> =
|
|
11
|
-
AsyncResultOption.
|
|
11
|
+
AsyncResultOption.singleton value
|
|
12
12
|
|
|
13
13
|
member inline _.ReturnFrom
|
|
14
14
|
(value: Async<Result<'ok option, 'error>>)
|
|
@@ -28,7 +28,7 @@ module AsyncResultOptionCE =
|
|
|
28
28
|
|
|
29
29
|
member inline _.Delay([<InlineIfLambda>] f: unit -> Async<'a>) : Async<'a> = async.Delay f
|
|
30
30
|
|
|
31
|
-
member inline _.Zero() = Async.singleton (Ok(
|
|
31
|
+
member inline _.Zero() = Async.singleton (Ok(Some()))
|
|
32
32
|
|
|
33
33
|
member inline _.TryWith
|
|
34
34
|
(
|
|
@@ -43,10 +43,7 @@ module AsyncResultOptionCE =
|
|
|
43
43
|
[<InlineIfLambda>] compensation: unit -> unit
|
|
44
44
|
) : AsyncResultOption<'ok, 'error> =
|
|
45
45
|
async.TryFinally(computation, compensation)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#if NETSTANDARD2_1
|
|
49
|
-
|
|
46
|
+
#if !FABLE_COMPILER
|
|
50
47
|
member inline _.TryFinallyAsync
|
|
51
48
|
(
|
|
52
49
|
computation: AsyncResultOption<'ok, 'error>,
|
|
@@ -66,10 +63,9 @@ module AsyncResultOptionCE =
|
|
|
66
63
|
|
|
67
64
|
Async.TryFinallyAsync(computation, compensation)
|
|
68
65
|
|
|
69
|
-
|
|
70
66
|
member inline this.Using
|
|
71
67
|
(
|
|
72
|
-
resource: 'ok :>
|
|
68
|
+
resource: 'ok :> IAsyncDisposableNull,
|
|
73
69
|
[<InlineIfLambda>] binder: 'ok -> AsyncResultOption<'okOut, 'error>
|
|
74
70
|
) : AsyncResultOption<'okOut, 'error> =
|
|
75
71
|
this.TryFinallyAsync(
|
|
@@ -83,12 +79,9 @@ module AsyncResultOptionCE =
|
|
|
83
79
|
)
|
|
84
80
|
#endif
|
|
85
81
|
|
|
86
|
-
|
|
87
82
|
member inline this.While
|
|
88
|
-
(
|
|
89
|
-
|
|
90
|
-
computation: AsyncResultOption<unit, 'error>
|
|
91
|
-
) : AsyncResultOption<unit, 'error> =
|
|
83
|
+
([<InlineIfLambda>] guard: unit -> bool, computation: AsyncResultOption<unit, 'error>)
|
|
84
|
+
: AsyncResultOption<unit, 'error> =
|
|
92
85
|
if guard () then
|
|
93
86
|
let mutable whileAsync = Unchecked.defaultof<_>
|
|
94
87
|
|
|
@@ -108,19 +101,7 @@ module AsyncResultOptionCE =
|
|
|
108
101
|
(result: AsyncResultOption<'ok, 'error>)
|
|
109
102
|
: AsyncResultOption<'ok, 'error> =
|
|
110
103
|
result
|
|
111
|
-
#if !FABLE_COMPILER
|
|
112
104
|
|
|
113
|
-
/// <summary>
|
|
114
|
-
/// Method lets us transform data types into our internal representation. This is the identity method to recognize the self type.
|
|
115
|
-
///
|
|
116
|
-
/// See https://stackoverflow.com/questions/35286541/why-would-you-use-builder-source-in-a-custom-computation-expression-builder
|
|
117
|
-
/// </summary>
|
|
118
|
-
member inline _.Source
|
|
119
|
-
(result: Task<Result<Option<'ok>, 'error>>)
|
|
120
|
-
: AsyncResultOption<'ok, 'error> =
|
|
121
|
-
result
|
|
122
|
-
|> Async.AwaitTask
|
|
123
|
-
#endif
|
|
124
105
|
let asyncResultOption = new AsyncResultOptionBuilder()
|
|
125
106
|
|
|
126
107
|
|
|
@@ -149,7 +130,7 @@ module AsyncResultOptionCEExtensions =
|
|
|
149
130
|
/// <summary>
|
|
150
131
|
/// Method lets us transform data types into our internal representation.
|
|
151
132
|
/// </summary>
|
|
152
|
-
member inline this.Source(optional:
|
|
133
|
+
member inline this.Source(optional: 'ok option) : AsyncResultOption<'ok, 'error> =
|
|
153
134
|
AsyncResultOption.ofOption optional
|
|
154
135
|
|
|
155
136
|
/// <summary>
|
|
@@ -161,17 +142,15 @@ module AsyncResultOptionCEExtensions =
|
|
|
161
142
|
|
|
162
143
|
member inline _.Using
|
|
163
144
|
(
|
|
164
|
-
resource: 'ok :>
|
|
145
|
+
resource: 'ok :> IDisposableNull,
|
|
165
146
|
[<InlineIfLambda>] binder: 'ok -> AsyncResultOption<'okOutput, 'error>
|
|
166
147
|
) : AsyncResultOption<'okOutput, 'error> =
|
|
167
148
|
async.Using(resource, binder)
|
|
168
149
|
|
|
169
150
|
|
|
170
151
|
member inline this.For
|
|
171
|
-
(
|
|
172
|
-
|
|
173
|
-
[<InlineIfLambda>] binder: 'ok -> AsyncResultOption<unit, 'error>
|
|
174
|
-
) : AsyncResultOption<unit, 'error> =
|
|
152
|
+
(sequence: #seq<'ok>, [<InlineIfLambda>] binder: 'ok -> AsyncResultOption<unit, 'error>)
|
|
153
|
+
: AsyncResultOption<unit, 'error> =
|
|
175
154
|
this.Using(
|
|
176
155
|
sequence.GetEnumerator(),
|
|
177
156
|
fun enum ->
|
|
@@ -215,7 +194,7 @@ module AsyncResultOptionCEExtensionsHighPriority =
|
|
|
215
194
|
/// <summary>
|
|
216
195
|
/// Method lets us transform data types into our internal representation.
|
|
217
196
|
/// </summary>
|
|
218
|
-
member inline _.Source(result: Async<
|
|
197
|
+
member inline _.Source(result: Async<'ok option>) : AsyncResultOption<'ok, 'error> =
|
|
219
198
|
AsyncResultOption.ofAsyncOption result
|
|
220
199
|
|
|
221
200
|
|
|
@@ -231,8 +210,27 @@ module AsyncResultOptionCEExtensionsHighPriority =
|
|
|
231
210
|
/// <summary>
|
|
232
211
|
/// Method lets us transform data types into our internal representation.
|
|
233
212
|
/// </summary>
|
|
234
|
-
member inline _.Source(result: Task<
|
|
213
|
+
member inline _.Source(result: Task<'ok option>) : AsyncResultOption<'ok, 'error> =
|
|
235
214
|
result
|
|
236
215
|
|> Async.AwaitTask
|
|
237
216
|
|> AsyncResultOption.ofAsyncOption
|
|
238
217
|
#endif
|
|
218
|
+
|
|
219
|
+
#if !FABLE_COMPILER
|
|
220
|
+
[<AutoOpen>]
|
|
221
|
+
module AsyncResultOptionCEExtensionsHighPriority2 =
|
|
222
|
+
|
|
223
|
+
type AsyncResultOptionBuilder with
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
/// <summary>
|
|
227
|
+
/// Method lets us transform data types into our internal representation. This is the identity method to recognize the self type.
|
|
228
|
+
///
|
|
229
|
+
/// See https://stackoverflow.com/questions/35286541/why-would-you-use-builder-source-in-a-custom-computation-expression-builder
|
|
230
|
+
/// </summary>
|
|
231
|
+
member inline _.Source
|
|
232
|
+
(result: Task<Result<'ok option, 'error>>)
|
|
233
|
+
: AsyncResultOption<'ok, 'error> =
|
|
234
|
+
result
|
|
235
|
+
|> Async.AwaitTask
|
|
236
|
+
#endif
|