@glutinum/cli 0.12.0 → 0.14.0

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.
Files changed (273) hide show
  1. package/README.md +35 -3
  2. package/dist/Glutinum.Converter/Abbreviations.js +246 -0
  3. package/dist/Glutinum.Converter/FsharpAST.js +98 -34
  4. package/dist/Glutinum.Converter/Generate.js +55 -8
  5. package/dist/Glutinum.Converter/GlueAST.js +446 -30
  6. package/dist/Glutinum.Converter/Log.js +7 -8
  7. package/dist/Glutinum.Converter/Merge.js +683 -31
  8. package/dist/Glutinum.Converter/Packages.js +308 -0
  9. package/dist/Glutinum.Converter/Printer.js +332 -170
  10. package/dist/Glutinum.Converter/Read.js +279 -6
  11. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +13 -7
  12. package/dist/Glutinum.Converter/Reader/Declaration.js +102 -17
  13. package/dist/Glutinum.Converter/Reader/Documentation.js +168 -73
  14. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +7 -51
  15. package/dist/Glutinum.Converter/Reader/ExportAssignment.js +64 -15
  16. package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +165 -0
  17. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +30 -5
  18. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +122 -4
  19. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +83 -7
  20. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +8 -8
  21. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +11 -8
  22. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +3 -2
  23. package/dist/Glutinum.Converter/Reader/Node.js +24 -10
  24. package/dist/Glutinum.Converter/Reader/Parameters.js +110 -7
  25. package/dist/Glutinum.Converter/Reader/Report.js +31 -12
  26. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +4 -3
  27. package/dist/Glutinum.Converter/Reader/TypeNode.js +1527 -248
  28. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +75 -20
  29. package/dist/Glutinum.Converter/Reader/TypeParameters.js +8 -5
  30. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +184 -50
  31. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +32 -13
  32. package/dist/Glutinum.Converter/Reader/Types.js +180 -0
  33. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +99 -43
  34. package/dist/Glutinum.Converter/Reader/Utils.js +1143 -55
  35. package/dist/Glutinum.Converter/Reader/VariableStatement.js +59 -14
  36. package/dist/Glutinum.Converter/Transform.js +8710 -1137
  37. package/dist/Glutinum.Converter/TypeScript.Extensions.js +3 -3
  38. package/dist/Glutinum.Converter/TypeScript.js +3 -3
  39. package/dist/Glutinum.Converter/Utils/Keywords.js +6 -6
  40. package/dist/Glutinum.Converter/Utils/List.js +3 -3
  41. package/dist/Glutinum.Converter/Utils/Naming.js +76 -14
  42. package/dist/Glutinum.Converter/Utils/String.js +7 -3
  43. package/dist/Program.js +230 -72
  44. package/package.json +4 -4
  45. package/src/Glutinum.Converter/js/bootstrap.js +109 -2
  46. package/src/Glutinum.Converter/js/host.js +144 -0
  47. package/src/Glutinum.Converter/js/npm.js +137 -0
  48. package/src/Glutinum.Converter/js/resolve.js +402 -0
  49. package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
  50. package/dist/Glutinum.Converter/Generate.js.map +0 -1
  51. package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
  52. package/dist/Glutinum.Converter/Log.js.map +0 -1
  53. package/dist/Glutinum.Converter/Merge.js.map +0 -1
  54. package/dist/Glutinum.Converter/Printer.js.map +0 -1
  55. package/dist/Glutinum.Converter/Read.js.map +0 -1
  56. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
  57. package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
  58. package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
  59. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
  60. package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
  61. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
  62. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
  63. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
  64. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
  65. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
  66. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
  67. package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
  68. package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
  69. package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
  70. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
  71. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
  72. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
  73. package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
  74. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
  75. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
  76. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
  77. package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
  78. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
  79. package/dist/Glutinum.Converter/Transform.js.map +0 -1
  80. package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
  81. package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
  82. package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
  83. package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
  84. package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
  85. package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
  86. package/dist/Program.js.map +0 -1
  87. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
  88. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +0 -105
  89. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
  90. package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
  91. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs +0 -766
  92. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +0 -218
  93. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
  94. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +0 -31
  95. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +0 -20
  96. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
  97. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +0 -19
  98. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +0 -207
  99. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +0 -127
  100. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
  101. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +0 -81
  102. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +0 -183
  103. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +0 -37
  104. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
  105. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +0 -24
  106. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +0 -439
  107. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +0 -217
  108. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +0 -18
  109. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
  110. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +0 -24
  111. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +0 -75
  112. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
  113. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
  114. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +0 -238
  115. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +0 -18
  116. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
  117. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +0 -24
  118. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +0 -190
  119. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +0 -194
  120. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +0 -18
  121. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
  122. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +0 -35
  123. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
  124. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +0 -218
  125. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +0 -358
  126. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
  127. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +0 -331
  128. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
  129. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
  130. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
  131. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +0 -21
  132. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +0 -644
  133. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +0 -45
  134. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
  135. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +0 -155
  136. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +0 -23
  137. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
  138. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +0 -45
  139. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +0 -201
  140. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +0 -65
  141. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
  142. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +0 -146
  143. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +0 -18
  144. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
  145. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +0 -57
  146. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
  147. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
  148. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
  149. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
  150. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
  151. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
  152. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +0 -172
  153. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +0 -148
  154. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +0 -18
  155. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
  156. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +0 -35
  157. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +0 -151
  158. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
  159. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
  160. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
  161. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -3
  162. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
  163. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
  164. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
  165. package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
  166. package/dist/fable_modules/fable-library-js.4.14.0/Array.js +0 -1242
  167. package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
  168. package/dist/fable_modules/fable-library-js.4.14.0/Async.js +0 -158
  169. package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
  170. package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.js +0 -183
  171. package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
  172. package/dist/fable_modules/fable-library-js.4.14.0/BigInt.js +0 -282
  173. package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
  174. package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.js +0 -138
  175. package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
  176. package/dist/fable_modules/fable-library-js.4.14.0/Boolean.js +0 -21
  177. package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
  178. package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
  179. package/dist/fable_modules/fable-library-js.4.14.0/Char.js +0 -169
  180. package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
  181. package/dist/fable_modules/fable-library-js.4.14.0/Choice.js +0 -184
  182. package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
  183. package/dist/fable_modules/fable-library-js.4.14.0/Date.js +0 -749
  184. package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
  185. package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.js +0 -268
  186. package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
  187. package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.js +0 -124
  188. package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
  189. package/dist/fable_modules/fable-library-js.4.14.0/Decimal.js +0 -212
  190. package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
  191. package/dist/fable_modules/fable-library-js.4.14.0/Double.js +0 -46
  192. package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
  193. package/dist/fable_modules/fable-library-js.4.14.0/Encoding.js +0 -173
  194. package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
  195. package/dist/fable_modules/fable-library-js.4.14.0/Event.js +0 -93
  196. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
  197. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
  198. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
  199. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.js +0 -27
  200. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
  201. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
  202. package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
  203. package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
  204. package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
  205. package/dist/fable_modules/fable-library-js.4.14.0/Guid.js +0 -142
  206. package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
  207. package/dist/fable_modules/fable-library-js.4.14.0/Int32.js +0 -135
  208. package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
  209. package/dist/fable_modules/fable-library-js.4.14.0/List.js +0 -1273
  210. package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
  211. package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
  212. package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
  213. package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.js +0 -93
  214. package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
  215. package/dist/fable_modules/fable-library-js.4.14.0/Map.js +0 -1396
  216. package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
  217. package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.js +0 -112
  218. package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
  219. package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.js +0 -327
  220. package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
  221. package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.js +0 -233
  222. package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
  223. package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
  224. package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
  225. package/dist/fable_modules/fable-library-js.4.14.0/Numeric.js +0 -71
  226. package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
  227. package/dist/fable_modules/fable-library-js.4.14.0/Observable.js +0 -113
  228. package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
  229. package/dist/fable_modules/fable-library-js.4.14.0/Option.js +0 -96
  230. package/dist/fable_modules/fable-library-js.4.14.0/README.md +0 -3
  231. package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
  232. package/dist/fable_modules/fable-library-js.4.14.0/Random.js +0 -170
  233. package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
  234. package/dist/fable_modules/fable-library-js.4.14.0/Range.js +0 -45
  235. package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
  236. package/dist/fable_modules/fable-library-js.4.14.0/Reflection.js +0 -461
  237. package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
  238. package/dist/fable_modules/fable-library-js.4.14.0/RegExp.js +0 -132
  239. package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
  240. package/dist/fable_modules/fable-library-js.4.14.0/Result.js +0 -165
  241. package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
  242. package/dist/fable_modules/fable-library-js.4.14.0/Seq.js +0 -1379
  243. package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
  244. package/dist/fable_modules/fable-library-js.4.14.0/Seq2.js +0 -111
  245. package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
  246. package/dist/fable_modules/fable-library-js.4.14.0/Set.js +0 -1789
  247. package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
  248. package/dist/fable_modules/fable-library-js.4.14.0/String.js +0 -543
  249. package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
  250. package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.js +0 -317
  251. package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
  252. package/dist/fable_modules/fable-library-js.4.14.0/System.Text.js +0 -162
  253. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
  254. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
  255. package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
  256. package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.js +0 -122
  257. package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
  258. package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.js +0 -177
  259. package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
  260. package/dist/fable_modules/fable-library-js.4.14.0/Timer.js +0 -67
  261. package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
  262. package/dist/fable_modules/fable-library-js.4.14.0/Types.js +0 -208
  263. package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
  264. package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.js +0 -4
  265. package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
  266. package/dist/fable_modules/fable-library-js.4.14.0/Uri.js +0 -142
  267. package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
  268. package/dist/fable_modules/fable-library-js.4.14.0/Util.js +0 -770
  269. package/dist/fable_modules/fable-library-js.4.14.0/big.d.ts +0 -338
  270. package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
  271. package/dist/fable_modules/fable-library-js.4.14.0/lib/big.js +0 -826
  272. package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
  273. package/dist/fable_modules/project_cracked.json +0 -1
@@ -1,218 +0,0 @@
1
- import { Result_MapError, Result_Map, FSharpResult$2 } from "../fable-library-js.4.14.0/Result.js";
2
- import { class_type } from "../fable-library-js.4.14.0/Reflection.js";
3
- import { disposeSafe, getEnumerator } from "../fable-library-js.4.14.0/Util.js";
4
-
5
- /**
6
- * This is an identity function, it calls the given function and return the promise value untouched.
7
- * <example>
8
- * <code lang="fsharp">
9
- * fetchUser ()
10
- * |> Promise.tap (fun user ->
11
- * // Do something
12
- * console.log "The user has been received"
13
- * )
14
- * |> Promise.map (fun user ->
15
- * // user value is available here untouched
16
- * )
17
- * </code>
18
- * </example>
19
- */
20
- export function tap(fn, a) {
21
- return a.then((x) => {
22
- fn(x);
23
- return x;
24
- });
25
- }
26
-
27
- /**
28
- * Map the <c>Promise</c> result into a <c>Result</c> type.
29
- * <example>
30
- * <code lang="fsharp">
31
- * Success example
32
- * Promise.lift 42
33
- * |> Promise.result
34
- * |> Promise.map (fun value ->
35
- * // value = Ok 42
36
- * )
37
- *
38
- * // Fail example
39
- * Promise.reject "Invalid value"
40
- * |> Promise.result
41
- * |> Promise.map (fun value ->
42
- * // value = Error "Invalid value"
43
- * )
44
- * </code>
45
- * </example>
46
- */
47
- export function result(a) {
48
- return a.then((ResultValue) => (new FSharpResult$2(0, [ResultValue]))).catch((ErrorValue) => (new FSharpResult$2(1, [ErrorValue])));
49
- }
50
-
51
- /**
52
- * Evaluates to `myPromise |> Promise.map (Result.map fn)`
53
- * <example>
54
- * <code lang="fsharp">
55
- * Promise.lift 42
56
- * |> Promise.result
57
- * |> Promise.mapResult (fun value ->
58
- * value + 10
59
- * )
60
- * |> Promise.map (fun value ->
61
- * // value = Ok 52
62
- * )
63
- * </code>
64
- * </example>
65
- */
66
- export function mapResult(fn, a) {
67
- return a.then((result_1) => Result_Map(fn, result_1));
68
- }
69
-
70
- /**
71
- * Transform the success part of a result promise into another promise.
72
- * <example>
73
- * <code lang="fsharp">
74
- * let multiplyBy2 (value : int) =
75
- * Promise.create (fun resolve reject ->
76
- * resolve (value * 2)
77
- * )
78
- *
79
- * Promise.lift 42
80
- * |> Promise.result
81
- * |> Promise.bindResult (fun value ->
82
- * multiplyBy2 value
83
- * )
84
- * |> Promise.map (fun value ->
85
- * // value = Ok 84
86
- * )
87
- * </code>
88
- * </example>
89
- */
90
- export function bindResult(fn, a) {
91
- return a.then((a_1) => {
92
- if (a_1.tag === 1) {
93
- return Promise.resolve(new FSharpResult$2(1, [a_1.fields[0]]));
94
- }
95
- else {
96
- const pr = fn(a_1.fields[0]);
97
- return pr.then((ResultValue) => (new FSharpResult$2(0, [ResultValue])));
98
- }
99
- });
100
- }
101
-
102
- /**
103
- * Evaluates to <c>myPromise |> Promise.map (Result.map fn)</c>
104
- * <example>
105
- * <code lang="fsharp">
106
- * Promise.reject -1
107
- * |> Promise.result
108
- * |> Promise.mapResultError (fun value ->
109
- * $"%s{value} is not a valid value"
110
- * )
111
- * |> Promise.map (fun value ->
112
- * // value = Error "-1 is not a valid value"
113
- * )
114
- * </code>
115
- * </example>
116
- */
117
- export function mapResultError(fn, a) {
118
- return a.then((result_1) => Result_MapError(fn, result_1));
119
- }
120
-
121
- export class PromiseBuilder {
122
- constructor() {
123
- }
124
- }
125
-
126
- export function PromiseBuilder_$reflection() {
127
- return class_type("Promise.PromiseBuilder", void 0, PromiseBuilder);
128
- }
129
-
130
- export function PromiseBuilder_$ctor() {
131
- return new PromiseBuilder();
132
- }
133
-
134
- export function PromiseBuilder__For_1565554B(_, seq, body) {
135
- let pr;
136
- let p = Promise.resolve(void 0);
137
- const enumerator = getEnumerator(seq);
138
- try {
139
- while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
140
- const a = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
141
- p = ((pr = p, pr.then(() => body(a))));
142
- }
143
- }
144
- finally {
145
- disposeSafe(enumerator);
146
- }
147
- return p;
148
- }
149
-
150
- export function PromiseBuilder__While_2044D34(this$, guard, p) {
151
- if (guard()) {
152
- return p.then(() => PromiseBuilder__While_2044D34(this$, guard, p));
153
- }
154
- else {
155
- return Promise.resolve(void 0);
156
- }
157
- }
158
-
159
- export function PromiseBuilder__TryFinally_7D49A2FD(_, p, compensation) {
160
- return p.then((x) => {
161
- compensation();
162
- return x;
163
- }).catch((er) => {
164
- compensation();
165
- throw er;
166
- });
167
- }
168
-
169
- export function PromiseBuilder__Delay_62FBFDE1(_, generator) {
170
- return {
171
- then: (onSuccess, onError) => {
172
- try {
173
- return generator().then(onSuccess, onError);
174
- }
175
- catch (er) {
176
- if (onError == null) {
177
- return Promise.reject(er);
178
- }
179
- else {
180
- try {
181
- const a = onError(er);
182
- return Promise.resolve(a);
183
- }
184
- catch (er_1) {
185
- return Promise.reject(er_1);
186
- }
187
- }
188
- }
189
- },
190
- catch: (onError_1) => {
191
- try {
192
- return generator().catch(onError_1);
193
- }
194
- catch (er_2) {
195
- try {
196
- const a_1 = onError_1(er_2);
197
- return Promise.resolve(a_1);
198
- }
199
- catch (er_3) {
200
- return Promise.reject(er_3);
201
- }
202
- }
203
- },
204
- };
205
- }
206
-
207
- export function PromiseBuilder__Run_212F1D4B(_, p) {
208
- return p.then((x) => x);
209
- }
210
-
211
- export function PromiseBuilder__Using_74F7E79D(this$, resource, binder) {
212
- return PromiseBuilder__TryFinally_7D49A2FD(this$, binder(resource), () => {
213
- let copyOfStruct = resource;
214
- disposeSafe(copyOfStruct);
215
- });
216
- }
217
-
218
- //# sourceMappingURL=Promise.fs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["./Promise.fs"],"names":["a","fn","x","ResultValue","ErrorValue","result","pr","p","enumerator","seq","body","guard","While","this","compensation","er","generator","onSuccess","onError","TryFinally","binder","resource","copyOfStruct"],"mappings":";;;;;;;;;;;;;;;;;;;;WA4LS,AAALA;AAAmB,AAAAC,WAAGC;eAAGA;;;;;;;;;;;;;;;;;;;;;;;;;WA6YzB,AAAgBF,yBAAT,uBAAAG,uCAAG,uBAAAC;;;;;;;;;;;;;;;;;;;WAwBL,AAALJ,qBAAU,WAAAC,IAAAI;;;;;;;;;;;;;;;;;;;;;;;;WA8BL,AAALL;AACU,YAAA,AAAAA;AAIF,mBAAA,gBAAM,uBAAN,AAAAA;;;AAFQM,uBAAR,AAAAL,GAAA,AAAAD;AAAQ,mBAAA,AAAAM,0BAAI,uBAAAH;;;;;;;;;;;;;;;;;;;;;WA0Bf,AAALH,qBAAU,gBAAAC,IAAAI;;;;;;;;;;;;;;;;;QA4BQC;AAFFC,YAAI,gBAAK;AACZC,uBAAA,cAAAC;AAAT;AAAA,eAAS,AAAAD;AAALR,sBAAK,AAAAQ;AACL,AAAAD,kBAAUD,KAALC,GAAK,AAAAD,cAAgB,AAAAI,KAAKV;;;;AADnC,oBAASQ;;WAETD;;;;AAMA,QAAG,AAAAI;AACE,eAAA,AAAsCJ,aAAtB,AAAAK,8BAAAC,OAAWF,OAAOJ;;;AAClC,eAAA,gBAAI;;;;;WAYT,AAA\u002BEA;AAAxD,AAAAO;eAAgBZ;;AAAc,AAAAY;AAAgB,cAAMC;;;;;;;AAUnE;AAAI,uBAAA,AAAAC,iBAAqBC,WAAWC;;;AAEhC,oBAAG,AAAWA;AAAc,2BAAA,eAAOH;;;AAE/B;AAAkBf,kCAAd,AAAAkB,QAAQH;AAAM,\u002BBAAA,gBAAAf;;;AACP,\u002BBAAA,eAAOe;;;;;;AAE1B;AAAI,uBAAA,AAAAC,kBAAkBE;;;AAElB;AAAkBlB,gCAAd,AAAAkB,UAAQH;AAAM,2BAAA,gBAAAf;;;AACP,2BAAA,eAAOe;;;;;;;;WAIe,AAAAR,cAAWL;;;;WAGxD,AAAAiB,oCAAAN,OAAgB,AAAAO,OAAOC;AAAqBC,2BAAAD;AAAA,oBAAAC","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -1,31 +0,0 @@
1
- [<AutoOpen>]
2
- module PromiseImpl
3
-
4
- let promise = Promise.PromiseBuilder()
5
-
6
- [<RequireQualifiedAccess>]
7
- module SettledValue =
8
-
9
- /// <summary>
10
- /// Helper functionm to convert a settled result into an F# result
11
- /// </summary>
12
- /// <param name="p">The settled result</param>
13
- /// <typeparam name="'T"></typeparam>
14
- /// <returns>The F# result</returns>
15
- /// <example>
16
- /// <code lang="fsharp">
17
- /// Promise.allSettled [success; rejection]
18
- /// |> Promise.iter (fun results ->
19
- /// for result in results do
20
- /// match SettledValue.toResult result with
21
- /// | Ok value ->
22
- /// printfn "Success: %A" value
23
- /// | Error err ->
24
- /// eprintfn "Error: %O" err
25
- /// )
26
- /// </code>
27
- /// </example>
28
- let toResult (p: Promise.SettledValue<'T>) =
29
- match p.status with
30
- | Promise.Fulfilled -> Ok p.value.Value
31
- | Promise.Rejected -> Error p.reason.Value
@@ -1,20 +0,0 @@
1
- import { PromiseBuilder_$ctor } from "./Promise.fs.js";
2
- import { value } from "../fable-library-js.4.14.0/Option.js";
3
- import { FSharpResult$2 } from "../fable-library-js.4.14.0/Result.js";
4
-
5
- export const promise = PromiseBuilder_$ctor();
6
-
7
- /**
8
- * Helper functionm to convert a settled result into an F# result
9
- */
10
- export function SettledValue_toResult(p) {
11
- const matchValue = p.status;
12
- if (matchValue === "rejected") {
13
- return new FSharpResult$2(1, [value(p.reason)]);
14
- }
15
- else {
16
- return new FSharpResult$2(0, [value(p.value)]);
17
- }
18
- }
19
-
20
- //# sourceMappingURL=PromiseImpl.fs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["./PromiseImpl.fs"],"names":["matchValue","p"],"mappings":";;;;uBAGc;;;;;;AAyBAA,uBAAA,AAAAC;AAAA,QAAA,AAAAD;AAEgB,eAAA,uBAAM,MAAA,AAAAC;;;AADL,eAAA,uBAAG,MAAA,AAAAA","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -1,19 +0,0 @@
1
- // Auto-Generated by FAKE; do not edit
2
- namespace System
3
- open System.Reflection
4
-
5
- [<assembly: AssemblyTitleAttribute("FsToolkit.ErrorHandling")>]
6
- [<assembly: AssemblyProductAttribute("FsToolkit.ErrorHandling")>]
7
- [<assembly: AssemblyDescriptionAttribute("FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling.")>]
8
- [<assembly: AssemblyVersionAttribute("4.16.0")>]
9
- [<assembly: AssemblyFileVersionAttribute("4.16.0")>]
10
- [<assembly: AssemblyConfigurationAttribute("Release")>]
11
- do ()
12
-
13
- module internal AssemblyVersionInformation =
14
- let [<Literal>] AssemblyTitle = "FsToolkit.ErrorHandling"
15
- let [<Literal>] AssemblyProduct = "FsToolkit.ErrorHandling"
16
- let [<Literal>] AssemblyDescription = "FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling."
17
- let [<Literal>] AssemblyVersion = "4.16.0"
18
- let [<Literal>] AssemblyFileVersion = "4.16.0"
19
- let [<Literal>] AssemblyConfiguration = "Release"
@@ -1,207 +0,0 @@
1
- namespace FsToolkit.ErrorHandling
2
-
3
- /// <summary>
4
- /// Helper functions for working with the <c>Async</c> type.
5
- /// </summary>
6
- [<RequireQualifiedAccess>]
7
- module Async =
8
-
9
- /// <summary>
10
- /// Converts a value to an <c>Async</c> value
11
- /// </summary>
12
- /// <param name="value">The value to convert to an <c>Async</c> value.</param>
13
- /// <returns>The <c>Async</c> value.</returns>
14
- let inline singleton (value: 'value) : Async<'value> =
15
- value
16
- |> async.Return
17
-
18
- /// <summary>
19
- /// Converts a value to an <c>Async</c> value
20
- /// </summary>
21
- /// <param name="value">The value to convert to an <c>Async</c> value.</param>
22
- /// <returns>The <c>Async</c> value.</returns>
23
- let inline retn (value: 'value) : Async<'value> =
24
- value
25
- |> async.Return
26
-
27
- /// <summary>
28
- /// Takes a transformation function and applies it to the value of an <c>Async</c> value.
29
- /// </summary>
30
- /// <param name="binder">The function to bind over the <c>Async</c> value.</param>
31
- /// <param name="input">The <c>Async</c> value to bind over.</param>
32
- /// <returns>The result of binding the function over the <c>Async</c> value.</returns>
33
- let inline bind
34
- ([<InlineIfLambda>] binder: 'input -> Async<'output>)
35
- (input: Async<'input>)
36
- : Async<'output> =
37
- async.Bind(input, binder)
38
-
39
- /// <summary>
40
- /// Applies an <c>Async</c> function to an <c>Async</c> value.
41
- /// </summary>
42
- /// <param name="applier">The <c>Async</c> function to apply.</param>
43
- /// <param name="input">The <c>Async</c> value to apply the function to.</param>
44
- /// <returns>The result of applying the function to the value.</returns>
45
- let inline apply (applier: Async<'input -> 'output>) (input: Async<'input>) : Async<'output> =
46
- bind (fun f' -> bind (fun x' -> singleton (f' x')) input) applier
47
-
48
- /// <summary>
49
- /// Applies a transformation to the value of an <c>Async</c> value to a new <c>Async</c> value using the provided function.
50
- /// </summary>
51
- /// <param name="mapper">The function to apply to the value of the <c>Async</c> value.</param>
52
- /// <param name="input">The <c>Async</c> value to transform.</param>
53
- /// <returns>The transformed <c>Async</c> value.</returns>
54
- let inline map
55
- ([<InlineIfLambda>] mapper: 'input -> 'output)
56
- (input: Async<'input>)
57
- : Async<'output> =
58
- bind
59
- (fun x' ->
60
- mapper x'
61
- |> singleton
62
- )
63
- input
64
-
65
- /// <summary>
66
- /// Applies a transformation to the values of two <c>Async</c> values to a new <c>Async</c> value using the provided function.
67
- /// </summary>
68
- /// <param name="mapper">The function to apply to the values of the <c>Async</c> values.</param>
69
- /// <param name="input1">The first <c>Async</c> value to transform.</param>
70
- /// <param name="input2">The second <c>Async</c> value to transform.</param>
71
- /// <returns>The transformed <c>Async</c> value.</returns>
72
- let inline map2
73
- ([<InlineIfLambda>] mapper: 'input1 -> 'input2 -> 'output)
74
- (input1: Async<'input1>)
75
- (input2: Async<'input2>)
76
- : Async<'output> =
77
- bind
78
- (fun x ->
79
- bind
80
- (fun y ->
81
- mapper x y
82
- |> singleton
83
- )
84
- input2
85
- )
86
- input1
87
-
88
- /// <summary>
89
- /// Applies a transformation to the values of three <c>Async</c> values to a new <c>Async</c> value using the provided function.
90
- /// </summary>
91
- /// <param name="mapper">The function to apply to the values of the <c>Async</c> values.</param>
92
- /// <param name="input1">The first <c>Async</c> value to transform.</param>
93
- /// <param name="input2">The second <c>Async</c> value to transform.</param>
94
- /// <param name="input3">The third <c>Async</c> value to transform.</param>
95
- /// <returns>The transformed <c>Async</c> value.</returns>
96
- let inline map3
97
- ([<InlineIfLambda>] mapper: 'input1 -> 'input2 -> 'input3 -> 'output)
98
- (input1: Async<'input1>)
99
- (input2: Async<'input2>)
100
- (input3: Async<'input3>)
101
- : Async<'output> =
102
- bind
103
- (fun x ->
104
- bind
105
- (fun y ->
106
- bind
107
- (fun z ->
108
- mapper x y z
109
- |> singleton
110
- )
111
- input3
112
- )
113
- input2
114
- )
115
- input1
116
-
117
- /// <summary>
118
- /// Takes two asyncs and returns a tuple of the pair
119
- /// </summary>
120
- /// <param name="left">The first async value.</param>
121
- /// <param name="right">The second async value.</param>
122
- /// <returns>The tuple of the pair.</returns>
123
- let inline zip (left: Async<'left>) (right: Async<'right>) : Async<'left * 'right> =
124
- bind (fun l -> bind (fun r -> singleton (l, r)) right) left
125
-
126
- /// <summary>
127
- /// Operators for working with the <c>Async</c> type.
128
- /// </summary>
129
- module AsyncOperators =
130
-
131
- /// <summary>
132
- /// Shorthand for <c>Async.map</c>
133
- /// </summary>
134
- /// <param name="mapper">The function to map over the <c>Async</c> value.</param>
135
- /// <param name="input">The <c>Async</c> value to map over.</param>
136
- /// <returns>The result of mapping the function over the <c>Async</c> value.</returns>
137
- let inline (<!>)
138
- ([<InlineIfLambda>] mapper: 'input -> 'output)
139
- (input: Async<'input>)
140
- : Async<'output> =
141
- Async.map mapper input
142
-
143
- /// <summary>
144
- /// Shorthand for <c>Async.apply</c>
145
- /// </summary>
146
- /// <param name="applier">The <c>Async</c> function to apply.</param>
147
- /// <param name="input">The <c>Async</c> value to apply the function to.</param>
148
- /// <returns>The result of applying the function to the value.</returns>
149
- let inline (<*>) (applier: Async<'input -> 'output>) (input: Async<'input>) : Async<'output> =
150
- Async.apply applier input
151
-
152
- /// <summary>
153
- /// Shorthand for <c>Async.bind</c>
154
- /// </summary>
155
- /// <param name="input">The <c>Async</c> value to bind over.</param>
156
- /// <param name="binder">The function to bind over the <c>Async</c> value.</param>
157
- /// <returns>The result of binding the function over the <c>Async</c> value.</returns>
158
- let inline (>>=)
159
- (input: Async<'input>)
160
- ([<InlineIfLambda>] binder: 'input -> Async<'output>)
161
- : Async<'output> =
162
- Async.bind binder input
163
-
164
-
165
- [<AutoOpen>]
166
- module AsyncExt =
167
- open System
168
-
169
- type Microsoft.FSharp.Control.Async with
170
-
171
- static member TryFinallyAsync(comp: Async<'T>, deferred) : Async<'T> =
172
-
173
- let finish (compResult, deferredResult) (cont, (econt: exn -> unit), ccont) =
174
- match (compResult, deferredResult) with
175
- | (Choice1Of3 x, Choice1Of3()) -> cont x
176
- | (Choice2Of3 compExn, Choice1Of3()) -> econt compExn
177
- | (Choice3Of3 compExn, Choice1Of3()) -> ccont compExn
178
- | (Choice1Of3 _, Choice2Of3 deferredExn) -> econt deferredExn
179
- | (Choice2Of3 compExn, Choice2Of3 deferredExn) ->
180
- econt
181
- <| new AggregateException(compExn, deferredExn)
182
- | (Choice3Of3 compExn, Choice2Of3 deferredExn) -> econt deferredExn
183
- | (_, Choice3Of3 deferredExn) ->
184
- econt
185
- <| new Exception("Unexpected cancellation.", deferredExn)
186
-
187
- let startDeferred compResult (cont, econt, ccont) =
188
- Async.StartWithContinuations(
189
- deferred,
190
- (fun () -> finish (compResult, Choice1Of3()) (cont, econt, ccont)),
191
- (fun exn -> finish (compResult, Choice2Of3 exn) (cont, econt, ccont)),
192
- (fun exn -> finish (compResult, Choice3Of3 exn) (cont, econt, ccont))
193
- )
194
-
195
- let startComp ct (cont, econt, ccont) =
196
- Async.StartWithContinuations(
197
- comp,
198
- (fun x -> startDeferred (Choice1Of3(x)) (cont, econt, ccont)),
199
- (fun exn -> startDeferred (Choice2Of3 exn) (cont, econt, ccont)),
200
- (fun exn -> startDeferred (Choice3Of3 exn) (cont, econt, ccont)),
201
- ct
202
- )
203
-
204
- async {
205
- let! ct = Async.CancellationToken
206
- return! Async.FromContinuations(startComp ct)
207
- }
@@ -1,127 +0,0 @@
1
- import { fromContinuations, cancellationToken, startWithContinuations } from "../fable-library-js.4.14.0/Async.js";
2
- import { FSharpChoice$3 } from "../fable-library-js.4.14.0/Choice.js";
3
- import { singleton } from "../fable-library-js.4.14.0/AsyncBuilder.js";
4
-
5
- export function Microsoft_FSharp_Control_FSharpAsync__Async_TryFinallyAsync_Static_Z753D11A1(comp, deferred) {
6
- const finish = (tupledArg, tupledArg_1) => {
7
- const compResult = tupledArg[0];
8
- const deferredResult = tupledArg[1];
9
- const econt = tupledArg_1[1];
10
- let matchResult, x, compExn, compExn_1, deferredExn, compExn_2, deferredExn_1, compExn_3, deferredExn_2, deferredExn_3;
11
- switch (compResult.tag) {
12
- case 1: {
13
- switch (deferredResult.tag) {
14
- case 1: {
15
- matchResult = 4;
16
- compExn_2 = compResult.fields[0];
17
- deferredExn_1 = deferredResult.fields[0];
18
- break;
19
- }
20
- case 2: {
21
- matchResult = 6;
22
- deferredExn_3 = deferredResult.fields[0];
23
- break;
24
- }
25
- default: {
26
- matchResult = 1;
27
- compExn = compResult.fields[0];
28
- }
29
- }
30
- break;
31
- }
32
- case 2: {
33
- switch (deferredResult.tag) {
34
- case 1: {
35
- matchResult = 5;
36
- compExn_3 = compResult.fields[0];
37
- deferredExn_2 = deferredResult.fields[0];
38
- break;
39
- }
40
- case 2: {
41
- matchResult = 6;
42
- deferredExn_3 = deferredResult.fields[0];
43
- break;
44
- }
45
- default: {
46
- matchResult = 2;
47
- compExn_1 = compResult.fields[0];
48
- }
49
- }
50
- break;
51
- }
52
- default:
53
- switch (deferredResult.tag) {
54
- case 1: {
55
- matchResult = 3;
56
- deferredExn = deferredResult.fields[0];
57
- break;
58
- }
59
- case 2: {
60
- matchResult = 6;
61
- deferredExn_3 = deferredResult.fields[0];
62
- break;
63
- }
64
- default: {
65
- matchResult = 0;
66
- x = compResult.fields[0];
67
- }
68
- }
69
- }
70
- switch (matchResult) {
71
- case 0: {
72
- tupledArg_1[0](x);
73
- break;
74
- }
75
- case 1: {
76
- econt(compExn);
77
- break;
78
- }
79
- case 2: {
80
- tupledArg_1[2](compExn_1);
81
- break;
82
- }
83
- case 3: {
84
- econt(deferredExn);
85
- break;
86
- }
87
- case 4: {
88
- econt(new Error([compExn_2, deferredExn_1]));
89
- break;
90
- }
91
- case 5: {
92
- econt(deferredExn_2);
93
- break;
94
- }
95
- case 6: {
96
- econt(new Error("Unexpected cancellation.", deferredExn_3));
97
- break;
98
- }
99
- }
100
- };
101
- const startDeferred = (compResult_1, tupledArg_2) => {
102
- const cont_1 = tupledArg_2[0];
103
- const econt_1 = tupledArg_2[1];
104
- const ccont_1 = tupledArg_2[2];
105
- startWithContinuations(deferred, () => {
106
- finish([compResult_1, new FSharpChoice$3(0, [void 0])], [cont_1, econt_1, ccont_1]);
107
- }, (exn) => {
108
- finish([compResult_1, new FSharpChoice$3(1, [exn])], [cont_1, econt_1, ccont_1]);
109
- }, (exn_1) => {
110
- finish([compResult_1, new FSharpChoice$3(2, [exn_1])], [cont_1, econt_1, ccont_1]);
111
- });
112
- };
113
- return singleton.Delay(() => singleton.Bind(cancellationToken(), (_arg) => singleton.ReturnFrom(fromContinuations((tupledArg_3) => {
114
- const cont_2 = tupledArg_3[0];
115
- const econt_2 = tupledArg_3[1];
116
- const ccont_2 = tupledArg_3[2];
117
- startWithContinuations(comp, (x_1) => {
118
- startDeferred(new FSharpChoice$3(0, [x_1]), [cont_2, econt_2, ccont_2]);
119
- }, (exn_2) => {
120
- startDeferred(new FSharpChoice$3(1, [exn_2]), [cont_2, econt_2, ccont_2]);
121
- }, (exn_3) => {
122
- startDeferred(new FSharpChoice$3(2, [exn_3]), [cont_2, econt_2, ccont_2]);
123
- }, _arg);
124
- }))));
125
- }
126
-
127
- //# sourceMappingURL=Async.fs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["./Async.fs"],"names":["finish","compResult","tupledArg","deferredResult","econt","x","compExn","deferredExn","startDeferred","cont","ccont","deferred","exn","\u0060\u0060builder@\u0060\u0060","comp","_arg1"],"mappings":";;;;;AA4KgBA;AAAQC,2BAAA,AAAAC;AAAYC,\u002BBAAZ,AAAAD;AAAoCE,sBAAP,AAAAF;yBAEvBG,GACAC,SACAA,WACcC,aACdD,WAAoBC,eAGpBD,WAAoBC,eACjBA;gBATVN;;wBAAYE;;;AAKLG,oCALR,AAACL;AAK2BM,wCAL5B,AAAaJ;;;;;AASFI,wCATX,AAAaJ;;;;;AAELG,kCAFR,AAACL;;;;;;wBAAYE;;;AAQLG,oCARR,AAACL;AAQ2BM,wCAR5B,AAAaJ;;;;;AASFI,wCATX,AAAaJ;;;;;AAGLG,oCAHR,AAACL;;;;;;wBAAYE;;;AAISI,sCAJtB,AAAaJ;;;;;AASFI,wCATX,AAAaJ;;;;;AACLE,4BADR,AAACJ;;;;;;AAC2B,AAFG,AAAAC,\u002BBAEEG;;;;AACC,AAAAD,sBAAME;;;;AACN,AAJH,AAAAJ,\u002BBAISI;;;;AACF,AAAAF,sBAAMG;;;;AAE9C,AAAAH,sBACG,WAAuBE,WAASC;;;;AACW,AAAAH,sBAAMG;;;;AAEpD,AAAAH,sBACG,UAAc,4BAA4BG;;;;;AAEjDC;AAA0BC,uBAAA,AAAAP;AAAME,wBAAN,AAAAF;AAAaQ,wBAAb,AAAAR;AAC1B,\u002BBACIS;AACW,AAAAX,oBAAQC,cAAY,uBAAU,YAAKQ,QAAML,SAAOM;;AAC/C,AAAAV,oBAAQC,cAAY,uBAAWW,SAAMH,QAAML,SAAOM;;AAClD,AAAAV,oBAAQC,cAAY,uBAAWW,WAAMH,QAAML,SAAOM;;;AAYtE,WAAA,AAAAG,sBACI,AAAAA,eAAU,\u002BBACV,AAAAA,qBAAQ;AAXMJ,uBAAA,AAAAP;AAAME,wBAAN,AAAAF;AAAaQ,wBAAb,AAAAR;AACd,\u002BBACIY;AACU,AAAAN,0BAAe,uBAAWH,QAAKI,QAAML,SAAOM;;AAC1C,AAAAF,0BAAe,uBAAWI,UAAMH,QAAML,SAAOM;;AAC7C,AAAAF,0BAAe,uBAAWI,UAAMH,QAAML,SAAOM;WAKxDK","file":null,"sourcesContent":null,"sourceRoot":null}