@glutinum/cli 0.13.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 +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/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,50 +0,0 @@
1
- export declare function compare(...args: any[]): number;
2
- export declare function compareOrdinal(x: string, y: string): number;
3
- export declare function compareTo(x: string, y: string): number;
4
- export declare function startsWith(str: string, pattern: string, ic: number): boolean;
5
- export declare function indexOfAny(str: string, anyOf: string[], ...args: number[]): number;
6
- export type IPrintfFormatContinuation = (f: (x: string) => any) => any;
7
- export interface IPrintfFormat {
8
- input: string;
9
- cont: IPrintfFormatContinuation;
10
- }
11
- export declare function printf(input: string): IPrintfFormat;
12
- export declare function interpolate(str: string, values: any[]): string;
13
- export declare function toConsole(arg: IPrintfFormat | string): any;
14
- export declare function toConsoleError(arg: IPrintfFormat | string): any;
15
- export declare function toText(arg: IPrintfFormat | string): any;
16
- export declare function toFail(arg: IPrintfFormat | string): any;
17
- export declare function fsFormat(str: string): (cont: (...args: any[]) => any) => any;
18
- export declare function format(str: string | object, ...args: any[]): string;
19
- export declare function endsWith(str: string, search: string): boolean;
20
- export declare function initialize(n: number, f: (i: number) => string): string;
21
- export declare function insert(str: string, startIndex: number, value: string): string;
22
- export declare function isNullOrEmpty(str: string | any): boolean;
23
- export declare function isNullOrWhiteSpace(str: string | any): boolean;
24
- export declare function concat(...xs: any[]): string;
25
- export declare function join<T>(delimiter: string, xs: Iterable<T>): string;
26
- export declare function joinWithIndices(delimiter: string, xs: string[], startIndex: number, count: number): string;
27
- export declare function toBase64String(inArray: ArrayLike<number>): string;
28
- export declare function fromBase64String(b64Encoded: string): number[];
29
- export declare function padLeft(str: string, len: number, ch?: string): string;
30
- export declare function padRight(str: string, len: number, ch?: string): string;
31
- export declare function remove(str: string, startIndex: number, count?: number): string;
32
- export declare function replace(str: string, search: string, replace: string): string;
33
- export declare function replicate(n: number, x: string): string;
34
- export declare function getCharAtIndex(input: string, index: number): string;
35
- export declare function split(str: string, splitters: string[], count?: number, options?: number): string[];
36
- export declare function trim(str: string, ...chars: string[]): string;
37
- export declare function trimStart(str: string, ...chars: string[]): any;
38
- export declare function trimEnd(str: string, ...chars: string[]): any;
39
- export declare function filter(pred: (char: string) => boolean, x: string): string;
40
- export declare function substring(str: string, startIndex: number, length?: number): string;
41
- export declare function toCharArray2(str: string, startIndex: number, length: number): string[];
42
- interface FormattableString {
43
- strs: TemplateStringsArray;
44
- args: any[];
45
- fmts?: string[];
46
- }
47
- export declare function fmt(strs: TemplateStringsArray, ...args: any[]): FormattableString;
48
- export declare function fmtWith(fmts: string[]): (strs: TemplateStringsArray, ...args: any[]) => FormattableString;
49
- export declare function getFormat(s: FormattableString): string;
50
- export {};
@@ -1,543 +0,0 @@
1
- import { toString as dateToString } from "./Date.js";
2
- import { compare as numericCompare, isNumeric, multiply, toExponential, toFixed, toHex, toPrecision } from "./Numeric.js";
3
- import { escape } from "./RegExp.js";
4
- import { toString } from "./Types.js";
5
- const fsFormatRegExp = /(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g;
6
- const interpolateRegExp = /(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g;
7
- const formatRegExp = /\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;
8
- function isLessThan(x, y) {
9
- return numericCompare(x, y) < 0;
10
- }
11
- function cmp(x, y, ic) {
12
- function isIgnoreCase(i) {
13
- return i === true ||
14
- i === 1 /* StringComparison.CurrentCultureIgnoreCase */ ||
15
- i === 3 /* StringComparison.InvariantCultureIgnoreCase */ ||
16
- i === 5 /* StringComparison.OrdinalIgnoreCase */;
17
- }
18
- function isOrdinal(i) {
19
- return i === 4 /* StringComparison.Ordinal */ ||
20
- i === 5 /* StringComparison.OrdinalIgnoreCase */;
21
- }
22
- if (x == null) {
23
- return y == null ? 0 : -1;
24
- }
25
- if (y == null) {
26
- return 1;
27
- } // everything is bigger than null
28
- if (isOrdinal(ic)) {
29
- if (isIgnoreCase(ic)) {
30
- x = x.toLowerCase();
31
- y = y.toLowerCase();
32
- }
33
- return (x === y) ? 0 : (x < y ? -1 : 1);
34
- }
35
- else {
36
- if (isIgnoreCase(ic)) {
37
- x = x.toLocaleLowerCase();
38
- y = y.toLocaleLowerCase();
39
- }
40
- return x.localeCompare(y);
41
- }
42
- }
43
- export function compare(...args) {
44
- switch (args.length) {
45
- case 2: return cmp(args[0], args[1], false);
46
- case 3: return cmp(args[0], args[1], args[2]);
47
- case 4: return cmp(args[0], args[1], args[2] === true);
48
- case 5: return cmp(args[0].substr(args[1], args[4]), args[2].substr(args[3], args[4]), false);
49
- case 6: return cmp(args[0].substr(args[1], args[4]), args[2].substr(args[3], args[4]), args[5]);
50
- case 7: return cmp(args[0].substr(args[1], args[4]), args[2].substr(args[3], args[4]), args[5] === true);
51
- default: throw new Error("String.compare: Unsupported number of parameters");
52
- }
53
- }
54
- export function compareOrdinal(x, y) {
55
- return cmp(x, y, 4 /* StringComparison.Ordinal */);
56
- }
57
- export function compareTo(x, y) {
58
- return cmp(x, y, 0 /* StringComparison.CurrentCulture */);
59
- }
60
- export function startsWith(str, pattern, ic) {
61
- if (str.length >= pattern.length) {
62
- return cmp(str.substr(0, pattern.length), pattern, ic) === 0;
63
- }
64
- return false;
65
- }
66
- export function indexOfAny(str, anyOf, ...args) {
67
- if (str == null || str === "") {
68
- return -1;
69
- }
70
- const startIndex = (args.length > 0) ? args[0] : 0;
71
- if (startIndex < 0) {
72
- throw new Error("Start index cannot be negative");
73
- }
74
- const length = (args.length > 1) ? args[1] : str.length - startIndex;
75
- if (length < 0) {
76
- throw new Error("Length cannot be negative");
77
- }
78
- if (startIndex + length > str.length) {
79
- throw new Error("Invalid startIndex and length");
80
- }
81
- const endIndex = startIndex + length;
82
- const anyOfAsStr = "".concat.apply("", anyOf);
83
- for (let i = startIndex; i < endIndex; i++) {
84
- if (anyOfAsStr.indexOf(str[i]) > -1) {
85
- return i;
86
- }
87
- }
88
- return -1;
89
- }
90
- export function printf(input) {
91
- return {
92
- input,
93
- cont: fsFormat(input),
94
- };
95
- }
96
- export function interpolate(str, values) {
97
- let valIdx = 0;
98
- let strIdx = 0;
99
- let result = "";
100
- interpolateRegExp.lastIndex = 0;
101
- let match = interpolateRegExp.exec(str);
102
- while (match) {
103
- // The first group corresponds to the no-escape char (^|[^%]), the actual pattern starts in the next char
104
- // Note: we don't use negative lookbehind because some browsers don't support it yet
105
- const matchIndex = match.index + (match[1] || "").length;
106
- result += str.substring(strIdx, matchIndex).replace(/%%/g, "%");
107
- const [, , flags, padLength, precision, format] = match;
108
- // Save interpolateRegExp.lastIndex before running formatReplacement because the values
109
- // may also involve interpolation and make use of interpolateRegExp (see #3078)
110
- strIdx = interpolateRegExp.lastIndex;
111
- result += formatReplacement(values[valIdx++], flags, padLength, precision, format);
112
- // Move interpolateRegExp.lastIndex one char behind to make sure we match the no-escape char next time
113
- interpolateRegExp.lastIndex = strIdx - 1;
114
- match = interpolateRegExp.exec(str);
115
- }
116
- result += str.substring(strIdx).replace(/%%/g, "%");
117
- return result;
118
- }
119
- function continuePrint(cont, arg) {
120
- return typeof arg === "string" ? cont(arg) : arg.cont(cont);
121
- }
122
- export function toConsole(arg) {
123
- // Don't remove the lambda here, see #1357
124
- return continuePrint((x) => console.log(x), arg);
125
- }
126
- export function toConsoleError(arg) {
127
- return continuePrint((x) => console.error(x), arg);
128
- }
129
- export function toText(arg) {
130
- return continuePrint((x) => x, arg);
131
- }
132
- export function toFail(arg) {
133
- return continuePrint((x) => {
134
- throw new Error(x);
135
- }, arg);
136
- }
137
- function formatReplacement(rep, flags, padLength, precision, format) {
138
- let sign = "";
139
- flags = flags || "";
140
- format = format || "";
141
- if (isNumeric(rep)) {
142
- if (format.toLowerCase() !== "x") {
143
- if (isLessThan(rep, 0)) {
144
- rep = multiply(rep, -1);
145
- sign = "-";
146
- }
147
- else {
148
- if (flags.indexOf(" ") >= 0) {
149
- sign = " ";
150
- }
151
- else if (flags.indexOf("+") >= 0) {
152
- sign = "+";
153
- }
154
- }
155
- }
156
- precision = precision == null ? null : parseInt(precision, 10);
157
- switch (format) {
158
- case "f":
159
- case "F":
160
- precision = precision != null ? precision : 6;
161
- rep = toFixed(rep, precision);
162
- break;
163
- case "g":
164
- case "G":
165
- rep = precision != null ? toPrecision(rep, precision) : toPrecision(rep);
166
- break;
167
- case "e":
168
- case "E":
169
- rep = precision != null ? toExponential(rep, precision) : toExponential(rep);
170
- break;
171
- case "x":
172
- rep = toHex(rep);
173
- break;
174
- case "X":
175
- rep = toHex(rep).toUpperCase();
176
- break;
177
- default: // AOid
178
- rep = String(rep);
179
- break;
180
- }
181
- }
182
- else if (rep instanceof Date) {
183
- rep = dateToString(rep);
184
- }
185
- else {
186
- rep = toString(rep);
187
- }
188
- padLength = typeof padLength === "number" ? padLength : parseInt(padLength, 10);
189
- if (!isNaN(padLength)) {
190
- const zeroFlag = flags.indexOf("0") >= 0; // Use '0' for left padding
191
- const minusFlag = flags.indexOf("-") >= 0; // Right padding
192
- const ch = minusFlag || !zeroFlag ? " " : "0";
193
- if (ch === "0") {
194
- rep = pad(rep, padLength - sign.length, ch, minusFlag);
195
- rep = sign + rep;
196
- }
197
- else {
198
- rep = pad(sign + rep, padLength, ch, minusFlag);
199
- }
200
- }
201
- else {
202
- rep = sign + rep;
203
- }
204
- return rep;
205
- }
206
- function createPrinter(cont, _strParts, _matches, _result = "", padArg = -1) {
207
- return (...args) => {
208
- // Make copies of the values passed by reference because the function can be used multiple times
209
- let result = _result;
210
- const strParts = _strParts.slice();
211
- const matches = _matches.slice();
212
- for (const arg of args) {
213
- const [, , flags, _padLength, precision, format] = matches[0];
214
- let padLength = _padLength;
215
- if (padArg >= 0) {
216
- padLength = padArg;
217
- padArg = -1;
218
- }
219
- else if (padLength === "*") {
220
- if (arg < 0) {
221
- throw new Error("Non-negative number required");
222
- }
223
- padArg = arg;
224
- continue;
225
- }
226
- result += strParts[0];
227
- result += formatReplacement(arg, flags, padLength, precision, format);
228
- strParts.splice(0, 1);
229
- matches.splice(0, 1);
230
- }
231
- if (matches.length === 0) {
232
- result += strParts[0];
233
- return cont(result);
234
- }
235
- else {
236
- return createPrinter(cont, strParts, matches, result, padArg);
237
- }
238
- };
239
- }
240
- export function fsFormat(str) {
241
- return (cont) => {
242
- fsFormatRegExp.lastIndex = 0;
243
- const strParts = [];
244
- const matches = [];
245
- let strIdx = 0;
246
- let match = fsFormatRegExp.exec(str);
247
- while (match) {
248
- // The first group corresponds to the no-escape char (^|[^%]), the actual pattern starts in the next char
249
- // Note: we don't use negative lookbehind because some browsers don't support it yet
250
- const matchIndex = match.index + (match[1] || "").length;
251
- strParts.push(str.substring(strIdx, matchIndex).replace(/%%/g, "%"));
252
- matches.push(match);
253
- strIdx = fsFormatRegExp.lastIndex;
254
- // Likewise we need to move fsFormatRegExp.lastIndex one char behind to make sure we match the no-escape char next time
255
- fsFormatRegExp.lastIndex -= 1;
256
- match = fsFormatRegExp.exec(str);
257
- }
258
- if (strParts.length === 0) {
259
- return cont(str.replace(/%%/g, "%"));
260
- }
261
- else {
262
- strParts.push(str.substring(strIdx).replace(/%%/g, "%"));
263
- return createPrinter(cont, strParts, matches);
264
- }
265
- };
266
- }
267
- export function format(str, ...args) {
268
- let str2;
269
- if (typeof str === "object") {
270
- // Called with culture info
271
- str2 = String(args[0]);
272
- args.shift();
273
- }
274
- else {
275
- str2 = str;
276
- }
277
- return str2.replace(formatRegExp, (_, idx, padLength, format, precision, pattern) => {
278
- if (idx < 0 || idx >= args.length) {
279
- throw new Error("Index must be greater or equal to zero and less than the arguments' length.");
280
- }
281
- let rep = args[idx];
282
- if (isNumeric(rep)) {
283
- precision = precision == null ? null : parseInt(precision, 10);
284
- switch (format) {
285
- case "f":
286
- case "F":
287
- precision = precision != null ? precision : 2;
288
- rep = toFixed(rep, precision);
289
- break;
290
- case "g":
291
- case "G":
292
- rep = precision != null ? toPrecision(rep, precision) : toPrecision(rep);
293
- break;
294
- case "e":
295
- case "E":
296
- rep = precision != null ? toExponential(rep, precision) : toExponential(rep);
297
- break;
298
- case "p":
299
- case "P":
300
- precision = precision != null ? precision : 2;
301
- rep = toFixed(multiply(rep, 100), precision) + " %";
302
- break;
303
- case "d":
304
- case "D":
305
- rep = precision != null ? padLeft(String(rep), precision, "0") : String(rep);
306
- break;
307
- case "x":
308
- case "X":
309
- rep = precision != null ? padLeft(toHex(rep), precision, "0") : toHex(rep);
310
- if (format === "X") {
311
- rep = rep.toUpperCase();
312
- }
313
- break;
314
- default:
315
- if (pattern) {
316
- let sign = "";
317
- rep = pattern.replace(/([0#,]+)(\.[0#]+)?/, (_, intPart, decimalPart) => {
318
- if (isLessThan(rep, 0)) {
319
- rep = multiply(rep, -1);
320
- sign = "-";
321
- }
322
- decimalPart = decimalPart == null ? "" : decimalPart.substring(1);
323
- rep = toFixed(rep, Math.max(decimalPart.length, 0));
324
- let [repInt, repDecimal] = rep.split(".");
325
- repDecimal || (repDecimal = "");
326
- const leftZeroes = intPart.replace(/,/g, "").replace(/^#+/, "").length;
327
- repInt = padLeft(repInt, leftZeroes, "0");
328
- const rightZeros = decimalPart.replace(/#+$/, "").length;
329
- if (rightZeros > repDecimal.length) {
330
- repDecimal = padRight(repDecimal, rightZeros, "0");
331
- }
332
- else if (rightZeros < repDecimal.length) {
333
- repDecimal = repDecimal.substring(0, rightZeros) + repDecimal.substring(rightZeros).replace(/0+$/, "");
334
- }
335
- // Thousands separator
336
- if (intPart.indexOf(",") > 0) {
337
- const i = repInt.length % 3;
338
- const thousandGroups = Math.floor(repInt.length / 3);
339
- let thousands = i > 0 ? repInt.substr(0, i) + (thousandGroups > 0 ? "," : "") : "";
340
- for (let j = 0; j < thousandGroups; j++) {
341
- thousands += repInt.substr(i + j * 3, 3) + (j < thousandGroups - 1 ? "," : "");
342
- }
343
- repInt = thousands;
344
- }
345
- return repDecimal.length > 0 ? repInt + "." + repDecimal : repInt;
346
- });
347
- rep = sign + rep;
348
- }
349
- }
350
- }
351
- else if (rep instanceof Date) {
352
- rep = dateToString(rep, pattern || format);
353
- }
354
- else {
355
- rep = toString(rep);
356
- }
357
- padLength = parseInt((padLength || " ").substring(1), 10);
358
- if (!isNaN(padLength)) {
359
- rep = pad(String(rep), Math.abs(padLength), " ", padLength < 0);
360
- }
361
- return rep;
362
- });
363
- }
364
- export function endsWith(str, search) {
365
- const idx = str.lastIndexOf(search);
366
- return idx >= 0 && idx === str.length - search.length;
367
- }
368
- export function initialize(n, f) {
369
- if (n < 0) {
370
- throw new Error("String length must be non-negative");
371
- }
372
- const xs = new Array(n);
373
- for (let i = 0; i < n; i++) {
374
- xs[i] = f(i);
375
- }
376
- return xs.join("");
377
- }
378
- export function insert(str, startIndex, value) {
379
- if (startIndex < 0 || startIndex > str.length) {
380
- throw new Error("startIndex is negative or greater than the length of this instance.");
381
- }
382
- return str.substring(0, startIndex) + value + str.substring(startIndex);
383
- }
384
- export function isNullOrEmpty(str) {
385
- return typeof str !== "string" || str.length === 0;
386
- }
387
- export function isNullOrWhiteSpace(str) {
388
- return typeof str !== "string" || /^\s*$/.test(str);
389
- }
390
- export function concat(...xs) {
391
- return xs.map((x) => String(x)).join("");
392
- }
393
- export function join(delimiter, xs) {
394
- if (Array.isArray(xs)) {
395
- return xs.join(delimiter);
396
- }
397
- else {
398
- return Array.from(xs).join(delimiter);
399
- }
400
- }
401
- export function joinWithIndices(delimiter, xs, startIndex, count) {
402
- const endIndexPlusOne = startIndex + count;
403
- if (endIndexPlusOne > xs.length) {
404
- throw new Error("Index and count must refer to a location within the buffer.");
405
- }
406
- return xs.slice(startIndex, endIndexPlusOne).join(delimiter);
407
- }
408
- function notSupported(name) {
409
- throw new Error("The environment doesn't support '" + name + "', please use a polyfill.");
410
- }
411
- export function toBase64String(inArray) {
412
- let str = "";
413
- for (let i = 0; i < inArray.length; i++) {
414
- str += String.fromCharCode(inArray[i]);
415
- }
416
- return typeof btoa === "function" ? btoa(str) : notSupported("btoa");
417
- }
418
- export function fromBase64String(b64Encoded) {
419
- const binary = typeof atob === "function" ? atob(b64Encoded) : notSupported("atob");
420
- const bytes = new Uint8Array(binary.length);
421
- for (let i = 0; i < binary.length; i++) {
422
- bytes[i] = binary.charCodeAt(i);
423
- }
424
- return bytes;
425
- }
426
- function pad(str, len, ch, isRight) {
427
- ch = ch || " ";
428
- len = len - str.length;
429
- for (let i = 0; i < len; i++) {
430
- str = isRight ? str + ch : ch + str;
431
- }
432
- return str;
433
- }
434
- export function padLeft(str, len, ch) {
435
- return pad(str, len, ch);
436
- }
437
- export function padRight(str, len, ch) {
438
- return pad(str, len, ch, true);
439
- }
440
- export function remove(str, startIndex, count) {
441
- if (startIndex >= str.length) {
442
- throw new Error("startIndex must be less than length of string");
443
- }
444
- if (typeof count === "number" && (startIndex + count) > str.length) {
445
- throw new Error("Index and count must refer to a location within the string.");
446
- }
447
- return str.slice(0, startIndex) + (typeof count === "number" ? str.substr(startIndex + count) : "");
448
- }
449
- export function replace(str, search, replace) {
450
- return str.replace(new RegExp(escape(search), "g"), replace);
451
- }
452
- export function replicate(n, x) {
453
- return initialize(n, () => x);
454
- }
455
- export function getCharAtIndex(input, index) {
456
- if (index < 0 || index >= input.length) {
457
- throw new Error("Index was outside the bounds of the array.");
458
- }
459
- return input[index];
460
- }
461
- export function split(str, splitters, count, options) {
462
- count = typeof count === "number" ? count : undefined;
463
- options = typeof options === "number" ? options : 0;
464
- if (count && count < 0) {
465
- throw new Error("Count cannot be less than zero");
466
- }
467
- if (count === 0) {
468
- return [];
469
- }
470
- const removeEmpty = (options & 1) === 1;
471
- const trim = (options & 2) === 2;
472
- splitters = splitters || [];
473
- splitters = splitters.filter(x => x).map(escape);
474
- splitters = splitters.length > 0 ? splitters : ["\\s"];
475
- const splits = [];
476
- const reg = new RegExp(splitters.join("|"), "g");
477
- let findSplits = true;
478
- let i = 0;
479
- do {
480
- const match = reg.exec(str);
481
- if (match === null) {
482
- const candidate = trim ? str.substring(i).trim() : str.substring(i);
483
- if (!removeEmpty || candidate.length > 0) {
484
- splits.push(candidate);
485
- }
486
- findSplits = false;
487
- }
488
- else {
489
- const candidate = trim ? str.substring(i, match.index).trim() : str.substring(i, match.index);
490
- if (!removeEmpty || candidate.length > 0) {
491
- if (count != null && splits.length + 1 === count) {
492
- splits.push(trim ? str.substring(i).trim() : str.substring(i));
493
- findSplits = false;
494
- }
495
- else {
496
- splits.push(candidate);
497
- }
498
- }
499
- i = reg.lastIndex;
500
- }
501
- } while (findSplits);
502
- return splits;
503
- }
504
- export function trim(str, ...chars) {
505
- if (chars.length === 0) {
506
- return str.trim();
507
- }
508
- const pattern = "[" + escape(chars.join("")) + "]+";
509
- return str.replace(new RegExp("^" + pattern), "").replace(new RegExp(pattern + "$"), "");
510
- }
511
- export function trimStart(str, ...chars) {
512
- return chars.length === 0
513
- ? str.trimStart()
514
- : str.replace(new RegExp("^[" + escape(chars.join("")) + "]+"), "");
515
- }
516
- export function trimEnd(str, ...chars) {
517
- return chars.length === 0
518
- ? str.trimEnd()
519
- : str.replace(new RegExp("[" + escape(chars.join("")) + "]+$"), "");
520
- }
521
- export function filter(pred, x) {
522
- return x.split("").filter((c) => pred(c)).join("");
523
- }
524
- export function substring(str, startIndex, length) {
525
- if ((startIndex + (length || 0) > str.length)) {
526
- throw new Error("Invalid startIndex and/or length");
527
- }
528
- return length != null ? str.substr(startIndex, length) : str.substr(startIndex);
529
- }
530
- export function toCharArray2(str, startIndex, length) {
531
- return substring(str, startIndex, length).split("");
532
- }
533
- export function fmt(strs, ...args) {
534
- return ({ strs, args });
535
- }
536
- export function fmtWith(fmts) {
537
- return (strs, ...args) => ({ strs, args, fmts });
538
- }
539
- export function getFormat(s) {
540
- return s.fmts
541
- ? s.strs.reduce((acc, newPart, index) => acc + `{${String(index - 1) + s.fmts[index - 1]}}` + newPart)
542
- : s.strs.reduce((acc, newPart, index) => acc + `{${index - 1}}` + newPart);
543
- }
@@ -1,79 +0,0 @@
1
- import { int32 } from "./Int32.js";
2
- import { IEnumerator, IEqualityComparer, IComparer } from "./Util.js";
3
- import { TypeInfo } from "./Reflection.js";
4
- import { FSharpRef } from "./Types.js";
5
- export declare class Comparer$1<T> implements IComparer<T> {
6
- readonly comparison: ((arg0: T, arg1: T) => int32);
7
- constructor(comparison: ((arg0: T, arg1: T) => int32));
8
- Compare(x: T, y: T): int32;
9
- }
10
- export declare function Comparer$1_$reflection(gen0: TypeInfo): TypeInfo;
11
- export declare function Comparer$1_$ctor_47C913C<T>(comparison: ((arg0: T, arg1: T) => int32)): Comparer$1<T>;
12
- export declare function Comparer$1_get_Default<T>(): Comparer$1<T>;
13
- export declare function Comparer$1_Create_47C913C<T>(comparison: ((arg0: T, arg1: T) => int32)): Comparer$1<T>;
14
- export declare function Comparer$1__Compare_5BDDA0<T>(_: Comparer$1<T>, x: T, y: T): int32;
15
- export declare class EqualityComparer$1<T> implements IEqualityComparer<T> {
16
- readonly getHashCode: ((arg0: T) => int32);
17
- readonly equals: ((arg0: T, arg1: T) => boolean);
18
- constructor(equals: ((arg0: T, arg1: T) => boolean), getHashCode: ((arg0: T) => int32));
19
- Equals(x: T, y: T): boolean;
20
- GetHashCode(x: T): int32;
21
- }
22
- export declare function EqualityComparer$1_$reflection(gen0: TypeInfo): TypeInfo;
23
- export declare function EqualityComparer$1_$ctor_Z6EE254AB<T>(equals: ((arg0: T, arg1: T) => boolean), getHashCode: ((arg0: T) => int32)): EqualityComparer$1<T>;
24
- export declare function EqualityComparer$1_get_Default<T>(): EqualityComparer$1<T>;
25
- export declare function EqualityComparer$1_Create_Z6EE254AB<T>(equals: ((arg0: T, arg1: T) => boolean), getHashCode: ((arg0: T) => int32)): EqualityComparer$1<T>;
26
- export declare function EqualityComparer$1__Equals_5BDDA0<T>(_: EqualityComparer$1<T>, x: T, y: T): boolean;
27
- export declare function EqualityComparer$1__GetHashCode_2B595<T>(_: EqualityComparer$1<T>, x: T): int32;
28
- export declare class Stack$1<T> implements Iterable<T> {
29
- contents: T[];
30
- count: int32;
31
- constructor(initialContents: T[], initialCount: int32);
32
- GetEnumerator(): IEnumerator<T>;
33
- [Symbol.iterator](): Iterator<T>;
34
- "System.Collections.IEnumerable.GetEnumerator"(): IEnumerator<any>;
35
- }
36
- export declare function Stack$1_$reflection(gen0: TypeInfo): TypeInfo;
37
- export declare function Stack$1_$ctor_Z524259A4<T>(initialCapacity: int32): Stack$1<T>;
38
- export declare function Stack$1_$ctor<T>(): Stack$1<T>;
39
- export declare function Stack$1_$ctor_BB573A<T>(xs: Iterable<T>): Stack$1<T>;
40
- export declare function Stack$1__Ensure_Z524259A4<T>(_: Stack$1<T>, newSize: int32): void;
41
- export declare function Stack$1__get_Count<T>(_: Stack$1<T>): int32;
42
- export declare function Stack$1__Pop<T>(_: Stack$1<T>): T;
43
- export declare function Stack$1__Peek<T>(_: Stack$1<T>): T;
44
- export declare function Stack$1__Contains_2B595<T>(_: Stack$1<T>, x: T): boolean;
45
- export declare function Stack$1__TryPeek_1F3DB691<T>(this$: Stack$1<T>, result: FSharpRef<T>): boolean;
46
- export declare function Stack$1__TryPop_1F3DB691<T>(this$: Stack$1<T>, result: FSharpRef<T>): boolean;
47
- export declare function Stack$1__Push_2B595<T>(this$: Stack$1<T>, x: T): void;
48
- export declare function Stack$1__Clear<T>(_: Stack$1<T>): void;
49
- export declare function Stack$1__TrimExcess<T>(this$: Stack$1<T>): void;
50
- export declare function Stack$1__ToArray<T>(_: Stack$1<T>): T[];
51
- export declare class Queue$1<T> implements Iterable<T> {
52
- contents: T[];
53
- count: int32;
54
- head: int32;
55
- tail: int32;
56
- constructor(initialContents: T[], initialCount: int32);
57
- GetEnumerator(): IEnumerator<T>;
58
- [Symbol.iterator](): Iterator<T>;
59
- "System.Collections.IEnumerable.GetEnumerator"(): IEnumerator<any>;
60
- }
61
- export declare function Queue$1_$reflection(gen0: TypeInfo): TypeInfo;
62
- export declare function Queue$1_$ctor_Z524259A4<T>(initialCapacity: int32): Queue$1<T>;
63
- export declare function Queue$1_$ctor<T>(): Queue$1<T>;
64
- export declare function Queue$1_$ctor_BB573A<T>(xs: Iterable<T>): Queue$1<T>;
65
- export declare function Queue$1__get_Count<T>(_: Queue$1<T>): int32;
66
- export declare function Queue$1__Enqueue_2B595<T>(_: Queue$1<T>, value: T): void;
67
- export declare function Queue$1__Dequeue<T>(_: Queue$1<T>): T;
68
- export declare function Queue$1__Peek<T>(_: Queue$1<T>): T;
69
- export declare function Queue$1__TryDequeue_1F3DB691<T>(this$: Queue$1<T>, result: FSharpRef<T>): boolean;
70
- export declare function Queue$1__TryPeek_1F3DB691<T>(this$: Queue$1<T>, result: FSharpRef<T>): boolean;
71
- export declare function Queue$1__Contains_2B595<T>(_: Queue$1<T>, x: T): boolean;
72
- export declare function Queue$1__Clear<T>(_: Queue$1<T>): void;
73
- export declare function Queue$1__TrimExcess<T>(_: Queue$1<T>): void;
74
- export declare function Queue$1__ToArray<T>(_: Queue$1<T>): T[];
75
- export declare function Queue$1__CopyTo_Z3B4C077E<T>(_: Queue$1<T>, target: T[], start: int32): void;
76
- export declare function Queue$1__size<T>(this$: Queue$1<T>): int32;
77
- export declare function Queue$1__toIndex_Z524259A4<T>(this$: Queue$1<T>, i: int32): int32;
78
- export declare function Queue$1__ensure_Z524259A4<T>(this$: Queue$1<T>, requiredSize: int32): void;
79
- export declare function Queue$1__toSeq<T>(this$: Queue$1<T>): Iterable<T>;