@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.
Files changed (319) hide show
  1. package/README.md +19 -1
  2. package/dist/Glutinum.Converter/Abbreviations.js +246 -0
  3. package/dist/Glutinum.Converter/FsharpAST.js +87 -28
  4. package/dist/Glutinum.Converter/Generate.js +55 -8
  5. package/dist/Glutinum.Converter/GlueAST.js +333 -34
  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 +323 -186
  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 -9
  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 +1524 -253
  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 +8292 -1119
  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 +61 -12
  42. package/dist/Glutinum.Converter/Utils/String.js +7 -3
  43. package/dist/Program.js +230 -72
  44. package/dist/fable_modules/Fable.Promise.3.2.1/AsyncIterable.fs +89 -0
  45. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/AsyncIterable.fs.js +29 -29
  46. package/dist/fable_modules/Fable.Promise.3.2.1/Fable.Promise.fableproj +25 -0
  47. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs +842 -766
  48. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs.js +26 -12
  49. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs +31 -31
  50. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs.js +5 -5
  51. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs +235 -0
  52. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs.js +384 -0
  53. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AssemblyInfo.fs +4 -4
  54. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs +89 -9
  55. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs.js +13 -12
  56. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOption.fs +50 -4
  57. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs +30 -39
  58. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs.js +10 -10
  59. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResult.fs +52 -8
  60. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs +26 -42
  61. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs.js +3 -3
  62. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOption.fs +17 -5
  63. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultOption.fs.js +26 -0
  64. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs +31 -33
  65. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs.js +3 -3
  66. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidation.fs +1 -6
  67. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs +10 -18
  68. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs.js +3 -3
  69. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/FsToolkit.ErrorHandling.fableproj +69 -0
  70. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs +68 -10
  71. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs.js +47 -41
  72. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Nullness.fs +81 -0
  73. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Option.fs +133 -2
  74. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs +139 -0
  75. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs.js +48 -0
  76. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/OptionOp.fs +3 -3
  77. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs +88 -0
  78. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs.js +30 -0
  79. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs +200 -0
  80. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs.js +18 -0
  81. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidation.fs +34 -0
  82. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs +244 -0
  83. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs.js +18 -0
  84. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs +87 -0
  85. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs.js +8 -8
  86. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs +8 -23
  87. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs.js +5 -5
  88. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs +1 -1
  89. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs.js +10 -10
  90. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs +7 -18
  91. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs.js +3 -3
  92. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs +503 -0
  93. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs.js +295 -0
  94. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Validation.fs +0 -5
  95. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs +7 -13
  96. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs.js +3 -3
  97. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValueOption.fs +1 -4
  98. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOption.fs +102 -0
  99. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionCE.fs +587 -0
  100. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionOp.fs +10 -0
  101. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +3 -3
  102. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.fs +3 -0
  103. 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
  104. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
  105. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  106. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Array.js +192 -86
  107. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Async.js +58 -53
  108. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/AsyncBuilder.js +29 -8
  109. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BigInt.js +71 -46
  110. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BitConverter.js +2 -2
  111. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Boolean.js +4 -3
  112. package/dist/fable_modules/fable-library-js.5.17.2/CHANGELOG.md +348 -0
  113. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Char.js +64 -31
  114. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Choice.js +2 -2
  115. package/dist/fable_modules/fable-library-js.5.17.2/CollectionUtil.js +182 -0
  116. package/dist/fable_modules/fable-library-js.5.17.2/ConditionalWeakTable.js +21 -0
  117. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Date.js +197 -112
  118. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOffset.js +46 -62
  119. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOnly.js +6 -6
  120. package/dist/fable_modules/fable-library-js.5.17.2/DateOnlyTemporal.js +146 -0
  121. package/dist/fable_modules/fable-library-js.5.17.2/DateTimeFormat.js +523 -0
  122. package/dist/fable_modules/fable-library-js.5.17.2/DateTimeOffsetTemporal.js +283 -0
  123. package/dist/fable_modules/fable-library-js.5.17.2/DateTimeTemporal.js +243 -0
  124. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Decimal.js +39 -13
  125. package/dist/fable_modules/fable-library-js.5.17.2/Directory.js +11 -0
  126. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Double.js +10 -3
  127. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Encoding.js +20 -8
  128. package/dist/fable_modules/fable-library-js.5.17.2/Environment.js +3 -0
  129. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Event.js +10 -1
  130. package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Collections.js +45 -0
  131. package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Core.js +156 -0
  132. package/dist/fable_modules/fable-library-js.5.17.2/File.js +27 -0
  133. package/dist/fable_modules/fable-library-js.5.17.2/Global.js +29 -0
  134. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Guid.js +33 -12
  135. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Int32.js +17 -17
  136. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/List.js +170 -106
  137. package/dist/fable_modules/fable-library-js.5.17.2/Long.js +38 -0
  138. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MailboxProcessor.js +13 -6
  139. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Map.js +65 -61
  140. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MapUtil.js +22 -4
  141. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableMap.js +28 -16
  142. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableSet.js +7 -7
  143. package/dist/fable_modules/fable-library-js.5.17.2/Native.js +14 -0
  144. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Numeric.js +44 -3
  145. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Observable.js +5 -3
  146. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Option.js +11 -20
  147. package/dist/fable_modules/fable-library-js.5.17.2/Path.js +31 -0
  148. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Random.js +22 -20
  149. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Range.js +12 -12
  150. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Reflection.js +50 -22
  151. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/RegExp.js +68 -30
  152. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Result.js +6 -6
  153. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq.js +229 -104
  154. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq2.js +1 -1
  155. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Set.js +153 -113
  156. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/String.js +238 -50
  157. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Collections.Generic.js +30 -14
  158. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Text.js +69 -31
  159. package/dist/fable_modules/fable-library-js.5.17.2/System.js +289 -0
  160. package/dist/fable_modules/fable-library-js.5.17.2/Task.js +27 -0
  161. package/dist/fable_modules/fable-library-js.5.17.2/TaskBuilder.js +72 -0
  162. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeOnly.js +6 -6
  163. package/dist/fable_modules/fable-library-js.5.17.2/TimeOnlyTemporal.js +142 -0
  164. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeSpan.js +18 -15
  165. package/dist/fable_modules/fable-library-js.5.17.2/TimeSpanTemporal.js +259 -0
  166. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Types.js +14 -24
  167. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Uri.js +44 -21
  168. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Util.js +49 -12
  169. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/lib/big.js +14 -11
  170. package/dist/fable_modules/fable-library-js.5.17.2/package.json +24 -0
  171. package/dist/fable_modules/fable-library-js.5.17.2/quotation.js +682 -0
  172. package/package.json +4 -4
  173. package/src/Glutinum.Converter/js/bootstrap.js +109 -2
  174. package/src/Glutinum.Converter/js/host.js +144 -0
  175. package/src/Glutinum.Converter/js/npm.js +137 -0
  176. package/src/Glutinum.Converter/js/resolve.js +402 -0
  177. package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
  178. package/dist/Glutinum.Converter/Generate.js.map +0 -1
  179. package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
  180. package/dist/Glutinum.Converter/Log.js.map +0 -1
  181. package/dist/Glutinum.Converter/Merge.js.map +0 -1
  182. package/dist/Glutinum.Converter/Printer.js.map +0 -1
  183. package/dist/Glutinum.Converter/Read.js.map +0 -1
  184. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
  185. package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
  186. package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
  187. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
  188. package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
  189. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
  190. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
  191. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
  192. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
  193. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
  194. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
  195. package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
  196. package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
  197. package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
  198. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
  199. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
  200. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
  201. package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
  202. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
  203. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
  204. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
  205. package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
  206. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
  207. package/dist/Glutinum.Converter/Transform.js.map +0 -1
  208. package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
  209. package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
  210. package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
  211. package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
  212. package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
  213. package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
  214. package/dist/Program.js.map +0 -1
  215. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
  216. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
  217. package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
  218. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
  219. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
  220. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
  221. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
  222. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
  223. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
  224. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
  225. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
  226. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
  227. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
  228. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
  229. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
  230. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
  231. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
  232. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
  233. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
  234. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
  235. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
  236. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
  237. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
  238. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
  239. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
  240. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
  241. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
  242. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
  243. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
  244. package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
  245. package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
  246. package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
  247. package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
  248. package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
  249. package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
  250. package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
  251. package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
  252. package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
  253. package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
  254. package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
  255. package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
  256. package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
  257. package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
  258. package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
  259. package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
  260. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
  261. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
  262. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
  263. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
  264. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
  265. package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
  266. package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
  267. package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
  268. package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
  269. package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
  270. package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
  271. package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
  272. package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
  273. package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
  274. package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
  275. package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
  276. package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
  277. package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
  278. package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
  279. package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
  280. package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
  281. package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
  282. package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
  283. package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
  284. package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
  285. package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
  286. package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
  287. package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
  288. package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
  289. package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
  290. package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
  291. package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
  292. package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
  293. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
  294. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
  295. package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
  296. package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
  297. package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
  298. package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
  299. package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
  300. package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
  301. package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
  302. package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
  303. package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
  304. package/dist/fable_modules/project_cracked.json +0 -1
  305. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionOp.fs +0 -0
  306. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOp.fs +0 -0
  307. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionOp.fs +0 -0
  308. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationOp.fs +0 -0
  309. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOp.fs +0 -0
  310. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionOp.fs +0 -0
  311. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationOp.fs +0 -0
  312. /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
  313. /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
  314. /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
  315. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/FSharp.Core.CompilerServices.js +0 -0
  316. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/README.md +0 -0
  317. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Timer.js +0 -0
  318. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Unicode.13.0.0.js +0 -0
  319. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/big.d.ts +0 -0
@@ -0,0 +1,38 @@
1
+ import { getPrefix, isValid } from "./Int32.js";
2
+ import { fromString } from "./BigInt.js";
3
+ import { Exception } from "./Util.js";
4
+ function getRange(unsigned, bitsize) {
5
+ switch (bitsize) {
6
+ case 64: return unsigned ?
7
+ [0n, 18446744073709551615n] :
8
+ [-9223372036854775808n, 9223372036854775807n];
9
+ default: throw new Exception("Invalid bit size.");
10
+ }
11
+ }
12
+ export function parse(str, style, unsigned, bitsize, radix) {
13
+ const res = isValid(str, style, radix);
14
+ if (res != null) {
15
+ let v = fromString(getPrefix(res.radix) + res.digits);
16
+ if (res.sign === "-") {
17
+ v = -v;
18
+ }
19
+ const [umin, umax] = getRange(true, bitsize);
20
+ if (!unsigned && res.radix !== 10 && v >= umin && v <= umax) {
21
+ v = BigInt.asIntN(bitsize, v);
22
+ }
23
+ const [min, max] = getRange(unsigned, bitsize);
24
+ if (v >= min && v <= max) {
25
+ return v;
26
+ }
27
+ }
28
+ throw new Exception(`The input string ${str} was not in a correct format.`);
29
+ }
30
+ export function tryParse(str, style, unsigned, bitsize, defValue) {
31
+ try {
32
+ defValue.contents = parse(str, style, unsigned, bitsize);
33
+ return true;
34
+ }
35
+ catch {
36
+ return false;
37
+ }
38
+ }
@@ -1,6 +1,7 @@
1
1
  import { defaultCancellationToken } from "./Async.js";
2
2
  import { fromContinuations } from "./Async.js";
3
3
  import { startImmediate } from "./Async.js";
4
+ import { Exception } from "./Util.js";
4
5
  class QueueCell {
5
6
  constructor(message) {
6
7
  this.value = message;
@@ -26,7 +27,9 @@ class MailboxQueue {
26
27
  else {
27
28
  delete this.firstAndLast;
28
29
  }
29
- return value;
30
+ // Wrap the value so falsy messages (0, false, "", null, undefined/unit)
31
+ // can be distinguished from an empty queue.
32
+ return { value };
30
33
  }
31
34
  return void 0;
32
35
  }
@@ -40,11 +43,11 @@ export class MailboxProcessor {
40
43
  }
41
44
  function __processEvents($this) {
42
45
  if ($this.continuation) {
43
- const value = $this.messages.tryGet();
44
- if (value) {
46
+ const dequeued = $this.messages.tryGet();
47
+ if (dequeued !== void 0) {
45
48
  const cont = $this.continuation;
46
49
  delete $this.continuation;
47
- cont(value);
50
+ cont(dequeued.value);
48
51
  }
49
52
  }
50
53
  }
@@ -54,7 +57,7 @@ export function startInstance($this) {
54
57
  export function receive($this) {
55
58
  return fromContinuations((conts) => {
56
59
  if ($this.continuation) {
57
- throw new Error("Receive can only be called once!");
60
+ throw new Exception("Receive can only be called once!");
58
61
  }
59
62
  $this.continuation = conts[0];
60
63
  __processEvents($this);
@@ -66,15 +69,19 @@ export function post($this, message) {
66
69
  }
67
70
  export function postAndAsyncReply($this, buildMessage) {
68
71
  let result;
72
+ // Use an explicit flag because the reply value itself may be undefined
73
+ // (e.g. AsyncReplyChannel<unit>), which must still complete the async.
74
+ let replied = false;
69
75
  let continuation;
70
76
  function checkCompletion() {
71
- if (result !== void 0 && continuation !== void 0) {
77
+ if (replied && continuation !== void 0) {
72
78
  continuation(result);
73
79
  }
74
80
  }
75
81
  const reply = {
76
82
  reply: (res) => {
77
83
  result = res;
84
+ replied = true;
78
85
  checkCompletion();
79
86
  },
80
87
  };
@@ -1,11 +1,13 @@
1
1
  import { record_type, bool_type, list_type, option_type, class_type } from "./Reflection.js";
2
2
  import { some, value as value_1 } from "./Option.js";
3
- import { structuralHash, compare, toIterator, equals, disposeSafe, getEnumerator, isArrayLike } from "./Util.js";
3
+ import { structuralHash, compare, toIterator, equals, disposeSafe, getEnumerator, isArrayLike, Exception } from "./Util.js";
4
+ import { KeyNotFoundException_$ctor } from "./System.Collections.Generic.js";
4
5
  import { singleton, ofArrayWithTail, head, tail, isEmpty as isEmpty_1, fold as fold_1, empty as empty_1, FSharpList, cons } from "./List.js";
5
6
  import { map as map_2, item, fill, setItem } from "./Array.js";
6
7
  import { Record } from "./Types.js";
7
8
  import { tryPick as tryPick_1, pick as pick_1, iterate as iterate_1, compareWith, map as map_1, unfold } from "./Seq.js";
8
9
  import { format, join } from "./String.js";
10
+ import { NotSupportedException_$ctor_Z721C83C5 } from "./System.js";
9
11
  export class MapTreeLeaf$2 {
10
12
  constructor(k, v) {
11
13
  this.k = k;
@@ -45,10 +47,10 @@ export function MapTreeNode$2__get_Right(_) {
45
47
  return _.right;
46
48
  }
47
49
  export function MapTreeNode$2__get_Height(_) {
48
- return _.h;
50
+ return _.h | 0;
49
51
  }
50
52
  export function MapTreeModule_empty() {
51
- return void 0;
53
+ return undefined;
52
54
  }
53
55
  export function MapTreeModule_sizeAux(acc_mut, m_mut) {
54
56
  MapTreeModule_sizeAux: while (true) {
@@ -72,10 +74,10 @@ export function MapTreeModule_sizeAux(acc_mut, m_mut) {
72
74
  }
73
75
  }
74
76
  export function MapTreeModule_size(x) {
75
- return MapTreeModule_sizeAux(0, x);
77
+ return MapTreeModule_sizeAux(0, x) | 0;
76
78
  }
77
79
  export function MapTreeModule_mk(l, k, v, r) {
78
- let mn, mn_1;
80
+ let mn = undefined, mn_1 = undefined;
79
81
  let hl;
80
82
  const m = l;
81
83
  if (m != null) {
@@ -103,7 +105,7 @@ export function MapTreeModule_mk(l, k, v, r) {
103
105
  }
104
106
  }
105
107
  export function MapTreeModule_rebalance(t1, k, v, t2) {
106
- let mn, mn_1, m_2, m2_2, mn_2, m_3, m2_3, mn_3;
108
+ let mn = undefined, mn_1 = undefined, m_2 = undefined, m2_2 = undefined, mn_2 = undefined, m_3 = undefined, m2_3 = undefined, mn_3 = undefined;
107
109
  let t1h;
108
110
  const m = t1;
109
111
  if (m != null) {
@@ -133,7 +135,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
133
135
  return MapTreeModule_mk(MapTreeModule_mk(t1, k, v, MapTreeNode$2__get_Left(t2l)), MapTreeLeaf$2__get_Key(t2l), MapTreeLeaf$2__get_Value(t2l), MapTreeModule_mk(MapTreeNode$2__get_Right(t2l), MapTreeLeaf$2__get_Key(t2$0027), MapTreeLeaf$2__get_Value(t2$0027), MapTreeNode$2__get_Right(t2$0027)));
134
136
  }
135
137
  else {
136
- throw new Error("internal error: Map.rebalance");
138
+ throw new Exception("internal error: Map.rebalance");
137
139
  }
138
140
  }
139
141
  else {
@@ -141,7 +143,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
141
143
  }
142
144
  }
143
145
  else {
144
- throw new Error("internal error: Map.rebalance");
146
+ throw new Exception("internal error: Map.rebalance");
145
147
  }
146
148
  }
147
149
  else if (t1h > (t2h + 2)) {
@@ -155,7 +157,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
155
157
  return MapTreeModule_mk(MapTreeModule_mk(MapTreeNode$2__get_Left(t1$0027), MapTreeLeaf$2__get_Key(t1$0027), MapTreeLeaf$2__get_Value(t1$0027), MapTreeNode$2__get_Left(t1r)), MapTreeLeaf$2__get_Key(t1r), MapTreeLeaf$2__get_Value(t1r), MapTreeModule_mk(MapTreeNode$2__get_Right(t1r), k, v, t2));
156
158
  }
157
159
  else {
158
- throw new Error("internal error: Map.rebalance");
160
+ throw new Exception("internal error: Map.rebalance");
159
161
  }
160
162
  }
161
163
  else {
@@ -163,7 +165,7 @@ export function MapTreeModule_rebalance(t1, k, v, t2) {
163
165
  }
164
166
  }
165
167
  else {
166
- throw new Error("internal error: Map.rebalance");
168
+ throw new Exception("internal error: Map.rebalance");
167
169
  }
168
170
  }
169
171
  else {
@@ -217,11 +219,11 @@ export function MapTreeModule_tryFind(comparer_mut, k_mut, m_mut) {
217
219
  continue MapTreeModule_tryFind;
218
220
  }
219
221
  else {
220
- return void 0;
222
+ return undefined;
221
223
  }
222
224
  }
223
225
  else {
224
- return void 0;
226
+ return undefined;
225
227
  }
226
228
  break;
227
229
  }
@@ -229,7 +231,7 @@ export function MapTreeModule_tryFind(comparer_mut, k_mut, m_mut) {
229
231
  export function MapTreeModule_find(comparer, k, m) {
230
232
  const matchValue = MapTreeModule_tryFind(comparer, k, m);
231
233
  if (matchValue == null) {
232
- throw new Error();
234
+ throw KeyNotFoundException_$ctor();
233
235
  }
234
236
  else {
235
237
  return value_1(matchValue);
@@ -327,7 +329,7 @@ export function MapTreeModule_spliceOutSuccessor(m) {
327
329
  }
328
330
  }
329
331
  else {
330
- throw new Error("internal error: Map.spliceOutSuccessor");
332
+ throw new Exception("internal error: Map.spliceOutSuccessor");
331
333
  }
332
334
  }
333
335
  export function MapTreeModule_remove(comparer, k, m) {
@@ -398,7 +400,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
398
400
  else {
399
401
  const c_1 = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;
400
402
  if (c_1 < 0) {
401
- const matchValue_2 = u(void 0);
403
+ const matchValue_2 = u(undefined);
402
404
  if (matchValue_2 != null) {
403
405
  return MapTreeNode$2_$ctor_Z39DE9543(k, value_1(matchValue_2), MapTreeModule_empty(), m, 2);
404
406
  }
@@ -416,7 +418,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
416
418
  }
417
419
  }
418
420
  else {
419
- const matchValue_4 = u(void 0);
421
+ const matchValue_4 = u(undefined);
420
422
  if (matchValue_4 != null) {
421
423
  return MapTreeNode$2_$ctor_Z39DE9543(k, value_1(matchValue_4), m, MapTreeModule_empty(), 2);
422
424
  }
@@ -427,7 +429,7 @@ export function MapTreeModule_change(comparer, k, u, m) {
427
429
  }
428
430
  }
429
431
  else {
430
- const matchValue = u(void 0);
432
+ const matchValue = u(undefined);
431
433
  if (matchValue != null) {
432
434
  return MapTreeLeaf$2_$ctor_5BDDA1(k, value_1(matchValue));
433
435
  }
@@ -521,7 +523,7 @@ export function MapTreeModule_tryPickOpt(f_mut, m_mut) {
521
523
  }
522
524
  }
523
525
  else {
524
- return void 0;
526
+ return undefined;
525
527
  }
526
528
  break;
527
529
  }
@@ -700,11 +702,15 @@ export function MapTreeModule_foldSectionOpt(comparer, lo, hi, f, m, x) {
700
702
  return x_3;
701
703
  }
702
704
  }
703
- else if ((comparer.Compare(lo, MapTreeLeaf$2__get_Key(m2)) <= 0) && (comparer.Compare(MapTreeLeaf$2__get_Key(m2), hi) <= 0)) {
704
- return f_1(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x_1);
705
- }
706
705
  else {
707
- return x_1;
706
+ const cLoKey_1 = comparer.Compare(lo, MapTreeLeaf$2__get_Key(m2)) | 0;
707
+ const cKeyHi_1 = comparer.Compare(MapTreeLeaf$2__get_Key(m2), hi) | 0;
708
+ if ((cLoKey_1 <= 0) && (cKeyHi_1 <= 0)) {
709
+ return f_1(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x_1);
710
+ }
711
+ else {
712
+ return x_1;
713
+ }
708
714
  }
709
715
  }
710
716
  else {
@@ -804,6 +810,9 @@ export function MapTreeModule_ofSeq(comparer, c) {
804
810
  }
805
811
  }
806
812
  }
813
+ /**
814
+ * Imperative left-to-right iterators.
815
+ */
807
816
  export class MapTreeModule_MapIterator$2 extends Record {
808
817
  constructor(stack, started) {
809
818
  super();
@@ -846,10 +855,10 @@ export function MapTreeModule_mkIterator(m) {
846
855
  return new MapTreeModule_MapIterator$2(MapTreeModule_collapseLHS(singleton(m)), false);
847
856
  }
848
857
  export function MapTreeModule_notStarted() {
849
- throw new Error("enumeration not started");
858
+ throw new Exception("enumeration not started");
850
859
  }
851
860
  export function MapTreeModule_alreadyFinished() {
852
- throw new Error("enumeration already finished");
861
+ throw new Exception("enumeration already finished");
853
862
  }
854
863
  export function MapTreeModule_current(i) {
855
864
  if (i.started) {
@@ -858,14 +867,14 @@ export function MapTreeModule_current(i) {
858
867
  if (head(matchValue) != null) {
859
868
  const m = value_1(head(matchValue));
860
869
  if (m instanceof MapTreeNode$2) {
861
- throw new Error("Please report error: Map iterator, unexpected stack for current");
870
+ throw new Exception("Please report error: Map iterator, unexpected stack for current");
862
871
  }
863
872
  else {
864
873
  return [MapTreeLeaf$2__get_Key(m), MapTreeLeaf$2__get_Value(m)];
865
874
  }
866
875
  }
867
876
  else {
868
- throw new Error("Please report error: Map iterator, unexpected stack for current");
877
+ throw new Exception("Please report error: Map iterator, unexpected stack for current");
869
878
  }
870
879
  }
871
880
  else {
@@ -883,7 +892,7 @@ export function MapTreeModule_moveNext(i) {
883
892
  if (head(matchValue) != null) {
884
893
  const m = value_1(head(matchValue));
885
894
  if (m instanceof MapTreeNode$2) {
886
- throw new Error("Please report error: Map iterator, unexpected stack for moveNext");
895
+ throw new Exception("Please report error: Map iterator, unexpected stack for moveNext");
887
896
  }
888
897
  else {
889
898
  i.stack = MapTreeModule_collapseLHS(tail(matchValue));
@@ -891,7 +900,7 @@ export function MapTreeModule_moveNext(i) {
891
900
  }
892
901
  }
893
902
  else {
894
- throw new Error("Please report error: Map iterator, unexpected stack for moveNext");
903
+ throw new Exception("Please report error: Map iterator, unexpected stack for moveNext");
895
904
  }
896
905
  }
897
906
  else {
@@ -928,7 +937,7 @@ export function MapTreeModule_toSeq(s) {
928
937
  return [en_1["System.Collections.Generic.IEnumerator`1.get_Current"](), en_1];
929
938
  }
930
939
  else {
931
- return void 0;
940
+ return undefined;
932
941
  }
933
942
  }, MapTreeModule_mkIEnumerator(s));
934
943
  }
@@ -937,7 +946,7 @@ export function MapTreeModule_leftmost(m_mut) {
937
946
  const m = m_mut;
938
947
  if (m != null) {
939
948
  const m2 = value_1(m);
940
- let matchResult, nd_1;
949
+ let matchResult = undefined, nd_1 = undefined;
941
950
  if (m2 instanceof MapTreeNode$2) {
942
951
  if (MapTreeNode$2__get_Height(m2) > 1) {
943
952
  matchResult = 0;
@@ -964,7 +973,7 @@ export function MapTreeModule_leftmost(m_mut) {
964
973
  }
965
974
  }
966
975
  else {
967
- throw new Error();
976
+ throw KeyNotFoundException_$ctor();
968
977
  }
969
978
  break;
970
979
  }
@@ -974,7 +983,7 @@ export function MapTreeModule_rightmost(m_mut) {
974
983
  const m = m_mut;
975
984
  if (m != null) {
976
985
  const m2 = value_1(m);
977
- let matchResult, nd_1;
986
+ let matchResult = undefined, nd_1 = undefined;
978
987
  if (m2 instanceof MapTreeNode$2) {
979
988
  if (MapTreeNode$2__get_Height(m2) > 1) {
980
989
  matchResult = 0;
@@ -1001,7 +1010,7 @@ export function MapTreeModule_rightmost(m_mut) {
1001
1010
  }
1002
1011
  }
1003
1012
  else {
1004
- throw new Error();
1013
+ throw KeyNotFoundException_$ctor();
1005
1014
  }
1006
1015
  break;
1007
1016
  }
@@ -1015,13 +1024,13 @@ export class FSharpMap {
1015
1024
  const this$ = this;
1016
1025
  return FSharpMap__ComputeHashCode(this$) | 0;
1017
1026
  }
1018
- Equals(that) {
1027
+ Equals(other) {
1019
1028
  const this$ = this;
1020
- if (that instanceof FSharpMap) {
1021
- const that_1 = that;
1029
+ if (other instanceof FSharpMap) {
1030
+ const that = other;
1022
1031
  const e1 = getEnumerator(this$);
1023
1032
  try {
1024
- const e2 = getEnumerator(that_1);
1033
+ const e2 = getEnumerator(that);
1025
1034
  try {
1026
1035
  const loop = () => {
1027
1036
  const m1 = e1["System.Collections.IEnumerator.MoveNext"]();
@@ -1080,27 +1089,22 @@ export class FSharpMap {
1080
1089
  const _ = this;
1081
1090
  return MapTreeModule_mkIEnumerator(_.tree);
1082
1091
  }
1083
- CompareTo(obj) {
1084
- const m = this;
1085
- if (obj instanceof FSharpMap) {
1086
- const m2 = obj;
1087
- return compareWith((kvp1, kvp2) => {
1088
- const c = m.comparer.Compare(kvp1[0], kvp2[0]) | 0;
1089
- return ((c !== 0) ? c : compare(kvp1[1], kvp2[1])) | 0;
1090
- }, m, m2) | 0;
1091
- }
1092
- else {
1093
- throw new Error("not comparable\\nParameter name: obj");
1094
- }
1092
+ CompareTo(other) {
1093
+ let that = undefined;
1094
+ const this$ = this;
1095
+ return ((other instanceof FSharpMap) ? ((that = other, compareWith((kvp1, kvp2) => {
1096
+ const c = this$.comparer.Compare(kvp1[0], kvp2[0]) | 0;
1097
+ return ((c !== 0) ? c : compare(kvp1[1], kvp2[1])) | 0;
1098
+ }, this$, that))) : 1) | 0;
1095
1099
  }
1096
1100
  "System.Collections.Generic.ICollection`1.Add2B595"(x) {
1097
- throw new Error("Map cannot be mutated");
1101
+ throw NotSupportedException_$ctor_Z721C83C5("Map cannot be mutated");
1098
1102
  }
1099
1103
  "System.Collections.Generic.ICollection`1.Clear"() {
1100
- throw new Error("Map cannot be mutated");
1104
+ throw NotSupportedException_$ctor_Z721C83C5("Map cannot be mutated");
1101
1105
  }
1102
1106
  "System.Collections.Generic.ICollection`1.Remove2B595"(x) {
1103
- throw new Error("Map cannot be mutated");
1107
+ throw NotSupportedException_$ctor_Z721C83C5("Map cannot be mutated");
1104
1108
  }
1105
1109
  "System.Collections.Generic.ICollection`1.Contains2B595"(x) {
1106
1110
  const m = this;
@@ -1126,10 +1130,10 @@ export class FSharpMap {
1126
1130
  return FSharpMap__get_Count(m) | 0;
1127
1131
  }
1128
1132
  clear() {
1129
- throw new Error("Map cannot be mutated");
1133
+ throw new Exception("Map cannot be mutated");
1130
1134
  }
1131
1135
  delete(_arg) {
1132
- throw new Error("Map cannot be mutated");
1136
+ throw new Exception("Map cannot be mutated");
1133
1137
  return false;
1134
1138
  }
1135
1139
  entries() {
@@ -1150,7 +1154,7 @@ export class FSharpMap {
1150
1154
  }
1151
1155
  set(k, v) {
1152
1156
  const m = this;
1153
- throw new Error("Map cannot be mutated");
1157
+ throw new Exception("Map cannot be mutated");
1154
1158
  return m;
1155
1159
  }
1156
1160
  values() {
@@ -1223,7 +1227,7 @@ export function FSharpMap__Partition(m, predicate) {
1223
1227
  return [FSharpMap_$ctor(m.comparer, patternInput[0]), FSharpMap_$ctor(m.comparer, patternInput[1])];
1224
1228
  }
1225
1229
  export function FSharpMap__get_Count(m) {
1226
- return MapTreeModule_size(m.tree);
1230
+ return MapTreeModule_size(m.tree) | 0;
1227
1231
  }
1228
1232
  export function FSharpMap__ContainsKey(m, key) {
1229
1233
  return MapTreeModule_mem(m.comparer, key, m.tree);
@@ -1264,7 +1268,7 @@ export function FSharpMap__ToArray(m) {
1264
1268
  return MapTreeModule_toArray(m.tree);
1265
1269
  }
1266
1270
  export function FSharpMap__ComputeHashCode(this$) {
1267
- const combineHash = (x, y) => (((x << 1) + y) + 631);
1271
+ const combineHash = (x, y) => ((((x << 1) + y) + 631) | 0);
1268
1272
  let res = 0;
1269
1273
  const enumerator = getEnumerator(this$);
1270
1274
  try {
@@ -1312,7 +1316,7 @@ export function pick(chooser, table) {
1312
1316
  return value_1(matchValue);
1313
1317
  }
1314
1318
  else {
1315
- throw new Error();
1319
+ throw KeyNotFoundException_$ctor();
1316
1320
  }
1317
1321
  }
1318
1322
  export function exists(predicate, table) {
@@ -1346,7 +1350,7 @@ export function findKey(predicate, table) {
1346
1350
  return some(k);
1347
1351
  }
1348
1352
  else {
1349
- return void 0;
1353
+ return undefined;
1350
1354
  }
1351
1355
  }, table);
1352
1356
  }
@@ -1357,7 +1361,7 @@ export function tryFindKey(predicate, table) {
1357
1361
  return some(k);
1358
1362
  }
1359
1363
  else {
1360
- return void 0;
1364
+ return undefined;
1361
1365
  }
1362
1366
  }, table);
1363
1367
  }
@@ -1392,5 +1396,5 @@ export function empty(comparer) {
1392
1396
  return FSharpMap_Empty(comparer);
1393
1397
  }
1394
1398
  export function count(table) {
1395
- return FSharpMap__get_Count(table);
1399
+ return FSharpMap__get_Count(table) | 0;
1396
1400
  }
@@ -1,4 +1,4 @@
1
- import { equals } from "./Util.js";
1
+ import { Exception, equals } from "./Util.js";
2
2
  import { Union } from "./Types.js";
3
3
  const CaseRules = {
4
4
  None: 0,
@@ -6,6 +6,7 @@ const CaseRules = {
6
6
  SnakeCase: 2,
7
7
  SnakeCaseAllCaps: 3,
8
8
  KebabCase: 4,
9
+ LowerAll: 5,
9
10
  };
10
11
  function dashify(str, separator) {
11
12
  return str.replace(/[a-z]?[A-Z]/g, (m) => m.length === 1
@@ -22,6 +23,8 @@ function changeCase(str, caseRule) {
22
23
  return dashify(str, "_").toUpperCase();
23
24
  case CaseRules.KebabCase:
24
25
  return dashify(str, "-");
26
+ case CaseRules.LowerAll:
27
+ return str.toLowerCase();
25
28
  case CaseRules.None:
26
29
  default:
27
30
  return str;
@@ -31,7 +34,7 @@ export function keyValueList(fields, caseRule = CaseRules.None) {
31
34
  const obj = {};
32
35
  const definedCaseRule = caseRule;
33
36
  function fail(kvPair) {
34
- throw new Error("Cannot infer key and value of " + String(kvPair));
37
+ throw new Exception("Cannot infer key and value of " + String(kvPair));
35
38
  }
36
39
  function assign(key, caseRule, value) {
37
40
  key = changeCase(key, caseRule);
@@ -96,9 +99,16 @@ export function addToSet(v, set) {
96
99
  set.add(v);
97
100
  return true;
98
101
  }
102
+ export function tryAddToDict(dict, k, v) {
103
+ if (dict.has(k)) {
104
+ return false;
105
+ }
106
+ dict.set(k, v);
107
+ return true;
108
+ }
99
109
  export function addToDict(dict, k, v) {
100
110
  if (dict.has(k)) {
101
- throw new Error("An item with the same key has already been added. Key: " + k);
111
+ throw new Exception("An item with the same key has already been added. Key: " + k);
102
112
  }
103
113
  dict.set(k, v);
104
114
  }
@@ -107,6 +117,14 @@ export function getItemFromDict(map, key) {
107
117
  return map.get(key);
108
118
  }
109
119
  else {
110
- throw new Error(`The given key '${key}' was not present in the dictionary.`);
120
+ throw new Exception(`The given key '${key}' was not present in the dictionary.`);
121
+ }
122
+ }
123
+ export function getItemFromDictOrCreate(map, key, createValue) {
124
+ if (map.has(key)) {
125
+ return map.get(key);
111
126
  }
127
+ const value = createValue(key);
128
+ map.set(key, value);
129
+ return value;
112
130
  }