starlight-fsharp-oracle 0.1.0 → 0.1.2

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 (167) hide show
  1. package/dist/Extensions/StringBuilder.js +2 -5
  2. package/dist/Extensions/TextNode.js +29 -54
  3. package/dist/FSharp.Oracle.Schema/Schema.js +113 -218
  4. package/dist/Generate.js +33 -63
  5. package/dist/Helpers.js +1 -2
  6. package/dist/Plugin.js +17 -31
  7. package/dist/Render/Documentation.js +1 -2
  8. package/dist/Render/Entries.js +29 -34
  9. package/dist/Render/Pages.js +10 -19
  10. package/dist/Render/Primitives.js +19 -32
  11. package/dist/Themes.js +3 -5
  12. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
  13. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +105 -0
  14. package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
  15. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
  16. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +232 -0
  17. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
  18. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +20 -0
  19. package/dist/fable_modules/Thoth.Json.Core.0.9.0/Decode.fs +1592 -0
  20. package/dist/fable_modules/Thoth.Json.Core.0.9.0/Decode.fs.js +1417 -0
  21. package/dist/fable_modules/Thoth.Json.Core.0.9.0/DecoderCE.fs +106 -0
  22. package/dist/fable_modules/Thoth.Json.Core.0.9.0/DecoderCE.fs.js +63 -0
  23. package/dist/fable_modules/Thoth.Json.Core.0.9.0/Encode.fs +380 -0
  24. package/dist/fable_modules/Thoth.Json.Core.0.9.0/Encode.fs.js +289 -0
  25. package/dist/fable_modules/Thoth.Json.Core.0.9.0/Thoth.Json.Core.fableproj +37 -0
  26. package/dist/fable_modules/Thoth.Json.Core.0.9.0/Types.fs +76 -0
  27. package/dist/fable_modules/Thoth.Json.Core.0.9.0/Types.fs.js +37 -0
  28. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Casing.fs +113 -0
  29. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Casing.fs.js +173 -0
  30. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Decode.fs +1153 -0
  31. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Decode.fs.js +622 -0
  32. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Domain.fs +91 -0
  33. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Domain.fs.js +103 -0
  34. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Encode.fs +893 -0
  35. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Encode.fs.js +836 -0
  36. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Prelude.fs +435 -0
  37. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Prelude.fs.js +389 -0
  38. package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Thoth.Json.Core.Auto.fableproj +43 -0
  39. package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs +88 -0
  40. package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs.js +102 -0
  41. package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Encode.fs +40 -0
  42. package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Encode.fs.js +59 -0
  43. package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Thoth.Json.JavaScript.fableproj +31 -0
  44. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Array.js +1347 -0
  45. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Async.js +134 -0
  46. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/AsyncBuilder.js +183 -0
  47. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/BigInt.js +306 -0
  48. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/BitConverter.js +138 -0
  49. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Boolean.js +22 -0
  50. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/CHANGELOG.md +191 -0
  51. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Char.js +202 -0
  52. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Choice.js +184 -0
  53. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/CollectionUtil.js +182 -0
  54. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/ConditionalWeakTable.js +21 -0
  55. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Date.js +755 -0
  56. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/DateOffset.js +261 -0
  57. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/DateOnly.js +124 -0
  58. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Decimal.js +236 -0
  59. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Double.js +47 -0
  60. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Encoding.js +185 -0
  61. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Event.js +93 -0
  62. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/FSharp.Collections.js +45 -0
  63. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/FSharp.Core.CompilerServices.js +27 -0
  64. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/FSharp.Core.js +156 -0
  65. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Global.js +29 -0
  66. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Guid.js +161 -0
  67. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Int32.js +135 -0
  68. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/List.js +1323 -0
  69. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Long.js +47 -0
  70. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MailboxProcessor.js +94 -0
  71. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Map.js +1396 -0
  72. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MapUtil.js +130 -0
  73. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MutableMap.js +339 -0
  74. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MutableSet.js +233 -0
  75. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Native.js +14 -0
  76. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Numeric.js +75 -0
  77. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Observable.js +113 -0
  78. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Option.js +104 -0
  79. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/README.md +3 -0
  80. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Random.js +172 -0
  81. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Range.js +45 -0
  82. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Reflection.js +460 -0
  83. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/RegExp.js +141 -0
  84. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Result.js +165 -0
  85. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Seq.js +1409 -0
  86. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Seq2.js +111 -0
  87. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Set.js +1788 -0
  88. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/String.js +649 -0
  89. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/System.Collections.Generic.js +333 -0
  90. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/System.Text.js +168 -0
  91. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/System.js +283 -0
  92. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/TimeOnly.js +122 -0
  93. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/TimeSpan.js +180 -0
  94. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Timer.js +67 -0
  95. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Types.js +198 -0
  96. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Unicode.13.0.0.js +4 -0
  97. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Uri.js +165 -0
  98. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Util.js +792 -0
  99. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/big.d.ts +338 -0
  100. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/lib/big.js +825 -0
  101. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/package.json +24 -0
  102. package/dist/fable_modules/fable-library-js.5.0.0-rc.7/quotation.js +618 -0
  103. package/package.json +4 -5
  104. package/packages/FSharp.Oracle/XmlDoc.fs +12 -1
  105. package/packages/FSharp.Oracle/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
  106. package/packages/FSharp.Oracle/obj/Debug/net10.0/FSharp.Oracle.AssemblyInfo.fs +17 -0
  107. package/packages/FSharp.Oracle/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
  108. package/packages/FSharp.Oracle/obj/Release/net10.0/FSharp.Oracle.AssemblyInfo.fs +17 -0
  109. package/packages/FSharp.Oracle.Schema/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
  110. package/packages/FSharp.Oracle.Schema/obj/Debug/net10.0/FSharp.Oracle.Schema.AssemblyInfo.fs +17 -0
  111. package/packages/FSharp.Oracle.Schema/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
  112. package/packages/FSharp.Oracle.Schema/obj/Release/net10.0/FSharp.Oracle.Schema.AssemblyInfo.fs +17 -0
  113. package/oracle-bin/FSharp.Compiler.Service.dll +0 -0
  114. package/oracle-bin/FSharp.Core.dll +0 -0
  115. package/oracle-bin/FSharp.DependencyManager.Nuget.dll +0 -0
  116. package/oracle-bin/FSharp.Oracle.Schema.dll +0 -0
  117. package/oracle-bin/FSharp.Oracle.Schema.pdb +0 -0
  118. package/oracle-bin/FSharp.Oracle.Schema.xml +0 -219
  119. package/oracle-bin/Fable.Core.dll +0 -0
  120. package/oracle-bin/Oracle +0 -0
  121. package/oracle-bin/Oracle.deps.json +0 -280
  122. package/oracle-bin/Oracle.dll +0 -0
  123. package/oracle-bin/Oracle.pdb +0 -0
  124. package/oracle-bin/Oracle.runtimeconfig.json +0 -13
  125. package/oracle-bin/Oracle.xml +0 -111
  126. package/oracle-bin/Thoth.Json.Core.Auto.dll +0 -0
  127. package/oracle-bin/Thoth.Json.Core.dll +0 -0
  128. package/oracle-bin/Thoth.Json.System.Text.Json.dll +0 -0
  129. package/oracle-bin/cs/FSharp.Compiler.Service.resources.dll +0 -0
  130. package/oracle-bin/cs/FSharp.Core.resources.dll +0 -0
  131. package/oracle-bin/cs/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  132. package/oracle-bin/de/FSharp.Compiler.Service.resources.dll +0 -0
  133. package/oracle-bin/de/FSharp.Core.resources.dll +0 -0
  134. package/oracle-bin/de/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  135. package/oracle-bin/es/FSharp.Compiler.Service.resources.dll +0 -0
  136. package/oracle-bin/es/FSharp.Core.resources.dll +0 -0
  137. package/oracle-bin/es/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  138. package/oracle-bin/fr/FSharp.Compiler.Service.resources.dll +0 -0
  139. package/oracle-bin/fr/FSharp.Core.resources.dll +0 -0
  140. package/oracle-bin/fr/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  141. package/oracle-bin/it/FSharp.Compiler.Service.resources.dll +0 -0
  142. package/oracle-bin/it/FSharp.Core.resources.dll +0 -0
  143. package/oracle-bin/it/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  144. package/oracle-bin/ja/FSharp.Compiler.Service.resources.dll +0 -0
  145. package/oracle-bin/ja/FSharp.Core.resources.dll +0 -0
  146. package/oracle-bin/ja/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  147. package/oracle-bin/ko/FSharp.Compiler.Service.resources.dll +0 -0
  148. package/oracle-bin/ko/FSharp.Core.resources.dll +0 -0
  149. package/oracle-bin/ko/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  150. package/oracle-bin/pl/FSharp.Compiler.Service.resources.dll +0 -0
  151. package/oracle-bin/pl/FSharp.Core.resources.dll +0 -0
  152. package/oracle-bin/pl/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  153. package/oracle-bin/pt-BR/FSharp.Compiler.Service.resources.dll +0 -0
  154. package/oracle-bin/pt-BR/FSharp.Core.resources.dll +0 -0
  155. package/oracle-bin/pt-BR/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  156. package/oracle-bin/ru/FSharp.Compiler.Service.resources.dll +0 -0
  157. package/oracle-bin/ru/FSharp.Core.resources.dll +0 -0
  158. package/oracle-bin/ru/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  159. package/oracle-bin/tr/FSharp.Compiler.Service.resources.dll +0 -0
  160. package/oracle-bin/tr/FSharp.Core.resources.dll +0 -0
  161. package/oracle-bin/tr/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  162. package/oracle-bin/zh-Hans/FSharp.Compiler.Service.resources.dll +0 -0
  163. package/oracle-bin/zh-Hans/FSharp.Core.resources.dll +0 -0
  164. package/oracle-bin/zh-Hans/FSharp.DependencyManager.Nuget.resources.dll +0 -0
  165. package/oracle-bin/zh-Hant/FSharp.Compiler.Service.resources.dll +0 -0
  166. package/oracle-bin/zh-Hant/FSharp.Core.resources.dll +0 -0
  167. package/oracle-bin/zh-Hant/FSharp.DependencyManager.Nuget.resources.dll +0 -0
@@ -0,0 +1,283 @@
1
+ import { Exception } from "./Util.js";
2
+ import { class_type } from "./Reflection.js";
3
+ import { SR_Arg_ArgumentOutOfRangeException, SR_ArgumentNull_Generic, SR_Arg_ArgumentException, SR_Arg_ParamName_Name, SR_Arg_TimeoutException, SR_Arg_StackOverflowException, SR_Arg_RankException, SR_Arg_OverflowException, SR_Arg_OutOfMemoryException, SR_Arg_NullReferenceException, SR_Arg_NotSupportedException, SR_Arg_NotImplementedException, SR_Arg_NotFiniteNumberException, SR_Arg_InvalidOperationException, SR_Arg_IndexOutOfRangeException, SR_Arg_FormatException, SR_Arg_DivideByZero, SR_Arg_ArithmeticException, SR_Arg_ApplicationException, SR_Arg_SystemException } from "./Global.js";
4
+ import { isNullOrEmpty } from "./String.js";
5
+ export class SystemException extends Exception {
6
+ constructor(message) {
7
+ super(message);
8
+ }
9
+ }
10
+ export function SystemException_$reflection() {
11
+ return class_type("System.SystemException", undefined, SystemException, class_type("System.Exception"));
12
+ }
13
+ export function SystemException_$ctor_Z721C83C5(message) {
14
+ return new SystemException(message);
15
+ }
16
+ export function SystemException_$ctor() {
17
+ return SystemException_$ctor_Z721C83C5(SR_Arg_SystemException);
18
+ }
19
+ export class ApplicationException extends Exception {
20
+ constructor(message) {
21
+ super(message);
22
+ }
23
+ }
24
+ export function ApplicationException_$reflection() {
25
+ return class_type("System.ApplicationException", undefined, ApplicationException, class_type("System.Exception"));
26
+ }
27
+ export function ApplicationException_$ctor_Z721C83C5(message) {
28
+ return new ApplicationException(message);
29
+ }
30
+ export function ApplicationException_$ctor() {
31
+ return ApplicationException_$ctor_Z721C83C5(SR_Arg_ApplicationException);
32
+ }
33
+ export class ArithmeticException extends Exception {
34
+ constructor(message) {
35
+ super(message);
36
+ }
37
+ }
38
+ export function ArithmeticException_$reflection() {
39
+ return class_type("System.ArithmeticException", undefined, ArithmeticException, class_type("System.Exception"));
40
+ }
41
+ export function ArithmeticException_$ctor_Z721C83C5(message) {
42
+ return new ArithmeticException(message);
43
+ }
44
+ export function ArithmeticException_$ctor() {
45
+ return ArithmeticException_$ctor_Z721C83C5(SR_Arg_ArithmeticException);
46
+ }
47
+ export class DivideByZeroException extends Exception {
48
+ constructor(message) {
49
+ super(message);
50
+ }
51
+ }
52
+ export function DivideByZeroException_$reflection() {
53
+ return class_type("System.DivideByZeroException", undefined, DivideByZeroException, class_type("System.Exception"));
54
+ }
55
+ export function DivideByZeroException_$ctor_Z721C83C5(message) {
56
+ return new DivideByZeroException(message);
57
+ }
58
+ export function DivideByZeroException_$ctor() {
59
+ return DivideByZeroException_$ctor_Z721C83C5(SR_Arg_DivideByZero);
60
+ }
61
+ export class FormatException extends Exception {
62
+ constructor(message) {
63
+ super(message);
64
+ }
65
+ }
66
+ export function FormatException_$reflection() {
67
+ return class_type("System.FormatException", undefined, FormatException, class_type("System.Exception"));
68
+ }
69
+ export function FormatException_$ctor_Z721C83C5(message) {
70
+ return new FormatException(message);
71
+ }
72
+ export function FormatException_$ctor() {
73
+ return FormatException_$ctor_Z721C83C5(SR_Arg_FormatException);
74
+ }
75
+ export class IndexOutOfRangeException extends Exception {
76
+ constructor(message) {
77
+ super(message);
78
+ }
79
+ }
80
+ export function IndexOutOfRangeException_$reflection() {
81
+ return class_type("System.IndexOutOfRangeException", undefined, IndexOutOfRangeException, class_type("System.Exception"));
82
+ }
83
+ export function IndexOutOfRangeException_$ctor_Z721C83C5(message) {
84
+ return new IndexOutOfRangeException(message);
85
+ }
86
+ export function IndexOutOfRangeException_$ctor() {
87
+ return IndexOutOfRangeException_$ctor_Z721C83C5(SR_Arg_IndexOutOfRangeException);
88
+ }
89
+ export class InvalidOperationException extends Exception {
90
+ constructor(message) {
91
+ super(message);
92
+ }
93
+ }
94
+ export function InvalidOperationException_$reflection() {
95
+ return class_type("System.InvalidOperationException", undefined, InvalidOperationException, class_type("System.Exception"));
96
+ }
97
+ export function InvalidOperationException_$ctor_Z721C83C5(message) {
98
+ return new InvalidOperationException(message);
99
+ }
100
+ export function InvalidOperationException_$ctor() {
101
+ return InvalidOperationException_$ctor_Z721C83C5(SR_Arg_InvalidOperationException);
102
+ }
103
+ export class NotFiniteNumberException extends Exception {
104
+ constructor(message) {
105
+ super(message);
106
+ }
107
+ }
108
+ export function NotFiniteNumberException_$reflection() {
109
+ return class_type("System.NotFiniteNumberException", undefined, NotFiniteNumberException, class_type("System.Exception"));
110
+ }
111
+ export function NotFiniteNumberException_$ctor_Z721C83C5(message) {
112
+ return new NotFiniteNumberException(message);
113
+ }
114
+ export function NotFiniteNumberException_$ctor() {
115
+ return NotFiniteNumberException_$ctor_Z721C83C5(SR_Arg_NotFiniteNumberException);
116
+ }
117
+ export class NotImplementedException extends Exception {
118
+ constructor(message) {
119
+ super(message);
120
+ }
121
+ }
122
+ export function NotImplementedException_$reflection() {
123
+ return class_type("System.NotImplementedException", undefined, NotImplementedException, class_type("System.Exception"));
124
+ }
125
+ export function NotImplementedException_$ctor_Z721C83C5(message) {
126
+ return new NotImplementedException(message);
127
+ }
128
+ export function NotImplementedException_$ctor() {
129
+ return NotImplementedException_$ctor_Z721C83C5(SR_Arg_NotImplementedException);
130
+ }
131
+ export class NotSupportedException extends Exception {
132
+ constructor(message) {
133
+ super(message);
134
+ }
135
+ }
136
+ export function NotSupportedException_$reflection() {
137
+ return class_type("System.NotSupportedException", undefined, NotSupportedException, class_type("System.Exception"));
138
+ }
139
+ export function NotSupportedException_$ctor_Z721C83C5(message) {
140
+ return new NotSupportedException(message);
141
+ }
142
+ export function NotSupportedException_$ctor() {
143
+ return NotSupportedException_$ctor_Z721C83C5(SR_Arg_NotSupportedException);
144
+ }
145
+ export class NullReferenceException extends Exception {
146
+ constructor(message) {
147
+ super(message);
148
+ }
149
+ }
150
+ export function NullReferenceException_$reflection() {
151
+ return class_type("System.NullReferenceException", undefined, NullReferenceException, class_type("System.Exception"));
152
+ }
153
+ export function NullReferenceException_$ctor_Z721C83C5(message) {
154
+ return new NullReferenceException(message);
155
+ }
156
+ export function NullReferenceException_$ctor() {
157
+ return NullReferenceException_$ctor_Z721C83C5(SR_Arg_NullReferenceException);
158
+ }
159
+ export class OutOfMemoryException extends Exception {
160
+ constructor(message) {
161
+ super(message);
162
+ }
163
+ }
164
+ export function OutOfMemoryException_$reflection() {
165
+ return class_type("System.OutOfMemoryException", undefined, OutOfMemoryException, class_type("System.Exception"));
166
+ }
167
+ export function OutOfMemoryException_$ctor_Z721C83C5(message) {
168
+ return new OutOfMemoryException(message);
169
+ }
170
+ export function OutOfMemoryException_$ctor() {
171
+ return OutOfMemoryException_$ctor_Z721C83C5(SR_Arg_OutOfMemoryException);
172
+ }
173
+ export class OverflowException extends Exception {
174
+ constructor(message) {
175
+ super(message);
176
+ }
177
+ }
178
+ export function OverflowException_$reflection() {
179
+ return class_type("System.OverflowException", undefined, OverflowException, class_type("System.Exception"));
180
+ }
181
+ export function OverflowException_$ctor_Z721C83C5(message) {
182
+ return new OverflowException(message);
183
+ }
184
+ export function OverflowException_$ctor() {
185
+ return OverflowException_$ctor_Z721C83C5(SR_Arg_OverflowException);
186
+ }
187
+ export class RankException extends Exception {
188
+ constructor(message) {
189
+ super(message);
190
+ }
191
+ }
192
+ export function RankException_$reflection() {
193
+ return class_type("System.RankException", undefined, RankException, class_type("System.Exception"));
194
+ }
195
+ export function RankException_$ctor_Z721C83C5(message) {
196
+ return new RankException(message);
197
+ }
198
+ export function RankException_$ctor() {
199
+ return RankException_$ctor_Z721C83C5(SR_Arg_RankException);
200
+ }
201
+ export class StackOverflowException extends Exception {
202
+ constructor(message) {
203
+ super(message);
204
+ }
205
+ }
206
+ export function StackOverflowException_$reflection() {
207
+ return class_type("System.StackOverflowException", undefined, StackOverflowException, class_type("System.Exception"));
208
+ }
209
+ export function StackOverflowException_$ctor_Z721C83C5(message) {
210
+ return new StackOverflowException(message);
211
+ }
212
+ export function StackOverflowException_$ctor() {
213
+ return StackOverflowException_$ctor_Z721C83C5(SR_Arg_StackOverflowException);
214
+ }
215
+ export class TimeoutException extends Exception {
216
+ constructor(message) {
217
+ super(message);
218
+ }
219
+ }
220
+ export function TimeoutException_$reflection() {
221
+ return class_type("System.TimeoutException", undefined, TimeoutException, class_type("System.Exception"));
222
+ }
223
+ export function TimeoutException_$ctor_Z721C83C5(message) {
224
+ return new TimeoutException(message);
225
+ }
226
+ export function TimeoutException_$ctor() {
227
+ return TimeoutException_$ctor_Z721C83C5(SR_Arg_TimeoutException);
228
+ }
229
+ export class ArgumentException extends Exception {
230
+ constructor(message, paramName) {
231
+ super(isNullOrEmpty(paramName) ? message : (((message + SR_Arg_ParamName_Name) + paramName) + "\')"));
232
+ this.paramName = paramName;
233
+ }
234
+ }
235
+ export function ArgumentException_$reflection() {
236
+ return class_type("System.ArgumentException", undefined, ArgumentException, class_type("System.Exception"));
237
+ }
238
+ export function ArgumentException_$ctor_Z384F8060(message, paramName) {
239
+ return new ArgumentException(message, paramName);
240
+ }
241
+ export function ArgumentException_$ctor() {
242
+ return ArgumentException_$ctor_Z384F8060(SR_Arg_ArgumentException, "");
243
+ }
244
+ export function ArgumentException_$ctor_Z721C83C5(message) {
245
+ return ArgumentException_$ctor_Z384F8060(message, "");
246
+ }
247
+ export function ArgumentException__get_ParamName(_) {
248
+ return _.paramName;
249
+ }
250
+ export class ArgumentNullException extends ArgumentException {
251
+ constructor(paramName, message) {
252
+ super(message, paramName);
253
+ }
254
+ }
255
+ export function ArgumentNullException_$reflection() {
256
+ return class_type("System.ArgumentNullException", undefined, ArgumentNullException, ArgumentException_$reflection());
257
+ }
258
+ export function ArgumentNullException_$ctor_Z384F8060(paramName, message) {
259
+ return new ArgumentNullException(paramName, message);
260
+ }
261
+ export function ArgumentNullException_$ctor_Z721C83C5(paramName) {
262
+ return ArgumentNullException_$ctor_Z384F8060(paramName, SR_ArgumentNull_Generic);
263
+ }
264
+ export function ArgumentNullException_$ctor() {
265
+ return ArgumentNullException_$ctor_Z721C83C5("");
266
+ }
267
+ export class ArgumentOutOfRangeException extends ArgumentException {
268
+ constructor(paramName, message) {
269
+ super(message, paramName);
270
+ }
271
+ }
272
+ export function ArgumentOutOfRangeException_$reflection() {
273
+ return class_type("System.ArgumentOutOfRangeException", undefined, ArgumentOutOfRangeException, ArgumentException_$reflection());
274
+ }
275
+ export function ArgumentOutOfRangeException_$ctor_Z384F8060(paramName, message) {
276
+ return new ArgumentOutOfRangeException(paramName, message);
277
+ }
278
+ export function ArgumentOutOfRangeException_$ctor_Z721C83C5(paramName) {
279
+ return ArgumentOutOfRangeException_$ctor_Z384F8060(paramName, SR_Arg_ArgumentOutOfRangeException);
280
+ }
281
+ export function ArgumentOutOfRangeException_$ctor() {
282
+ return ArgumentOutOfRangeException_$ctor_Z721C83C5("");
283
+ }
@@ -0,0 +1,122 @@
1
+ import { hours, minutes, seconds, milliseconds } from "./TimeSpan.js";
2
+ import { Exception, DateTimeKind, padWithZeros } from "./Util.js";
3
+ const millisecondsPerDay = 86400000;
4
+ export function create(h = 0, m = 0, s = 0, ms = 0) {
5
+ if (h < 0 || m < 0 || s < 0 || ms < 0)
6
+ throw new Exception("The parameters describe an unrepresentable TimeOnly.");
7
+ return h * 3600000 + m * 60000 + s * 1000 + ms;
8
+ }
9
+ export function fromTicks(ticks) {
10
+ return Number(BigInt(ticks) / 10000n);
11
+ }
12
+ export function fromTimeSpan(timeSpan) {
13
+ if (timeSpan < 0 || timeSpan >= millisecondsPerDay)
14
+ throw new Exception("The TimeSpan describes an unrepresentable TimeOnly.");
15
+ return timeSpan;
16
+ }
17
+ export function fromDateTime(d) {
18
+ return d.kind === DateTimeKind.Utc
19
+ ? create(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds())
20
+ : create(d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());
21
+ }
22
+ export function maxValue() {
23
+ // This is "23:59:59.999"
24
+ return millisecondsPerDay - 1;
25
+ }
26
+ export function add(t, ts, wrappedDays) {
27
+ if (wrappedDays === undefined) {
28
+ const t2 = (t + ts) % millisecondsPerDay;
29
+ return t2 < 0 ? millisecondsPerDay + t2 : t2;
30
+ }
31
+ wrappedDays.contents = ts / millisecondsPerDay;
32
+ let newMs = t + ts % millisecondsPerDay;
33
+ if (newMs < 0) {
34
+ wrappedDays.contents--;
35
+ newMs += millisecondsPerDay;
36
+ }
37
+ else {
38
+ if (newMs >= millisecondsPerDay) {
39
+ wrappedDays.contents++;
40
+ newMs -= millisecondsPerDay;
41
+ }
42
+ }
43
+ return newMs;
44
+ }
45
+ export function addHours(t, h) {
46
+ return add(t, h * 3600000);
47
+ }
48
+ export function addMinutes(t, m) {
49
+ return add(t, m * 60000);
50
+ }
51
+ export function isBetween(t, start, end) {
52
+ return start <= end
53
+ ? (start <= t && end > t)
54
+ : (start <= t || end > t);
55
+ }
56
+ export function toString(t, format = "t", _provider) {
57
+ if (["r", "R", "o", "O", "t", "T"].indexOf(format) === -1) {
58
+ throw new Exception("Custom formats are not supported");
59
+ }
60
+ const base = `${padWithZeros(hours(t), 2)}:${padWithZeros(minutes(t), 2)}`;
61
+ if (format === "t")
62
+ return base;
63
+ const s = padWithZeros(seconds(t), 2);
64
+ // We're limited to millisecond precision, so the last 4 digits will always be 0
65
+ return `${base}${format === "o" || format === "O" ? `:${s}.${padWithZeros(milliseconds(t), 3)}0000` : `:${s}`}`;
66
+ }
67
+ export function parse(str) {
68
+ // Allowed format types:
69
+ // hh:mm
70
+ // hh:mm:ss
71
+ // hh:mm:ss.fffffff
72
+ const r = /^\s*([0-1]?\d|2[0-3])\s*:\s*([0-5]?\d)(\s*:\s*([0-5]?\d)(\.(\d+))?)?\s*$/.exec(str);
73
+ if (r != null && r[1] != null && r[2] != null) {
74
+ let ms = 0;
75
+ let s = 0;
76
+ const h = +r[1];
77
+ const m = +r[2];
78
+ if (r[4] != null) {
79
+ s = +r[4];
80
+ }
81
+ if (r[6] != null) {
82
+ // Depending on the number of decimals passed, we need to adapt the numbers
83
+ switch (r[6].length) {
84
+ case 1:
85
+ ms = +r[6] * 100;
86
+ break;
87
+ case 2:
88
+ ms = +r[6] * 10;
89
+ break;
90
+ case 3:
91
+ ms = +r[6];
92
+ break;
93
+ case 4:
94
+ ms = +r[6] / 10;
95
+ break;
96
+ case 5:
97
+ ms = +r[6] / 100;
98
+ break;
99
+ case 6:
100
+ ms = +r[6] / 1000;
101
+ break;
102
+ default:
103
+ ms = +r[6].substring(0, 7) / 10000;
104
+ break;
105
+ }
106
+ }
107
+ return create(h, m, s, Math.trunc(ms));
108
+ }
109
+ throw new Exception(`String '${str}' was not recognized as a valid TimeOnly.`);
110
+ }
111
+ export function tryParse(v, defValue) {
112
+ try {
113
+ defValue.contents = parse(v);
114
+ return true;
115
+ }
116
+ catch {
117
+ return false;
118
+ }
119
+ }
120
+ export function op_Subtraction(left, right) {
121
+ return add(left, -right);
122
+ }
@@ -0,0 +1,180 @@
1
+ import { Exception, comparePrimitives, padLeftAndRightWithZeros, padWithZeros } from "./Util.js";
2
+ import { toInt64, fromFloat64 } from "./BigInt.js";
3
+ /**
4
+ * Calls:
5
+ * - `Math.ceil` if the `value` is **negative**
6
+ * - `Math.floor` if the `value` is **positive**
7
+ * @param value Value to round
8
+ */
9
+ function signedRound(value) {
10
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
11
+ }
12
+ export function create(d = 0, h = 0, m = 0, s = 0, ms = 0) {
13
+ switch (arguments.length) {
14
+ case 1:
15
+ // ticks
16
+ return fromTicks(arguments[0]);
17
+ case 3:
18
+ // h,m,s
19
+ d = 0, h = arguments[0], m = arguments[1], s = arguments[2], ms = 0;
20
+ break;
21
+ default:
22
+ // d,h,m,s,ms
23
+ break;
24
+ }
25
+ return d * 86400000 + h * 3600000 + m * 60000 + s * 1000 + ms;
26
+ }
27
+ export function fromTicks(ticks) {
28
+ return Number(BigInt(ticks) / 10000n);
29
+ }
30
+ export function fromDays(d, h = 0, m = 0n, s = 0n, ms = 0n) {
31
+ return create(d, h, Number(m), Number(s), Number(ms));
32
+ }
33
+ export function fromHours(h, m = 0n, s = 0n, ms = 0n) {
34
+ return create(0, h, Number(m), Number(s), Number(ms));
35
+ }
36
+ export function fromMinutes(m, s = 0n, ms = 0n) {
37
+ return create(0, 0, Number(m), Number(s), Number(ms));
38
+ }
39
+ export function fromSeconds(s, ms = 0n) {
40
+ return create(0, 0, 0, Number(s), Number(ms));
41
+ }
42
+ export function fromMilliseconds(ms) {
43
+ return Number(ms);
44
+ }
45
+ export function days(ts) {
46
+ return signedRound(ts / 86400000);
47
+ }
48
+ export function hours(ts) {
49
+ return signedRound(ts % 86400000 / 3600000);
50
+ }
51
+ export function minutes(ts) {
52
+ return signedRound(ts % 3600000 / 60000);
53
+ }
54
+ export function seconds(ts) {
55
+ return signedRound(ts % 60000 / 1000);
56
+ }
57
+ export function milliseconds(ts) {
58
+ return signedRound(ts % 1000);
59
+ }
60
+ export function ticks(ts) {
61
+ return toInt64(fromFloat64(ts * 10000));
62
+ }
63
+ export function totalDays(ts) {
64
+ return ts / 86400000;
65
+ }
66
+ export function totalHours(ts) {
67
+ return ts / 3600000;
68
+ }
69
+ export function totalMinutes(ts) {
70
+ return ts / 60000;
71
+ }
72
+ export function totalSeconds(ts) {
73
+ return ts / 1000;
74
+ }
75
+ export function negate(ts) {
76
+ return ts * -1;
77
+ }
78
+ export function add(ts1, ts2) {
79
+ return ts1 + ts2;
80
+ }
81
+ export function subtract(ts1, ts2) {
82
+ return ts1 - ts2;
83
+ }
84
+ export function multiply(ts, factor) {
85
+ return ts * factor;
86
+ }
87
+ export function divide(ts, b) {
88
+ return ts / b;
89
+ }
90
+ export const op_Addition = add;
91
+ export const op_Subtraction = subtract;
92
+ export const op_Multiply = multiply;
93
+ export const op_Division = divide;
94
+ export const compare = comparePrimitives;
95
+ export const compareTo = comparePrimitives;
96
+ export function duration(x) {
97
+ return Math.abs(x);
98
+ }
99
+ export function toString(ts, format = "c", _provider) {
100
+ if (["c", "g", "G"].indexOf(format) === -1) {
101
+ throw new Exception("Custom formats are not supported");
102
+ }
103
+ const d = Math.abs(days(ts));
104
+ const h = Math.abs(hours(ts));
105
+ const m = Math.abs(minutes(ts));
106
+ const s = Math.abs(seconds(ts));
107
+ const ms = Math.abs(milliseconds(ts));
108
+ const sign = ts < 0 ? "-" : "";
109
+ return `${sign}${d === 0 && (format === "c" || format === "g") ? "" : format === "c" ? d + "." : d + ":"}${format === "g" ? h : padWithZeros(h, 2)}:${padWithZeros(m, 2)}:${padWithZeros(s, 2)}${ms === 0 && (format === "c" || format === "g") ? "" : format === "g" ? "." + padWithZeros(ms, 3) : "." + padLeftAndRightWithZeros(ms, 3, 7)}`;
110
+ }
111
+ export function parse(str) {
112
+ const firstDot = str.search("\\.");
113
+ const firstColon = str.search("\\:");
114
+ if (firstDot === -1 && firstColon === -1) { // There is only a day ex: 4
115
+ const d = parseInt(str, 0);
116
+ if (isNaN(d)) {
117
+ throw new Exception(`String '${str}' was not recognized as a valid TimeSpan.`);
118
+ }
119
+ else {
120
+ return create(d, 0, 0, 0, 0);
121
+ }
122
+ }
123
+ if (firstColon > 0) { // process time part
124
+ // WIP: (-?)(((\d+)\.)?([0-9]|0[0-9]|1[0-9]|2[0-3]):(\d+)(:\d+(\.\d{1,7})?)?|\d+(?:(?!\.)))
125
+ const r = /^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(str);
126
+ if (r != null && r[4] != null && r[5] != null) {
127
+ let d = 0;
128
+ let ms = 0;
129
+ let s = 0;
130
+ const sign = r[1] != null && r[1] === "-" ? -1 : 1;
131
+ const h = +r[4];
132
+ const m = +r[5];
133
+ if (r[3] != null) {
134
+ d = +r[3];
135
+ }
136
+ if (r[7] != null) {
137
+ s = +r[7];
138
+ }
139
+ if (r[8] != null) {
140
+ // Depending on the number of decimals passed, we need to adapt the numbers
141
+ switch (r[8].length) {
142
+ case 1:
143
+ ms = +r[8] * 100;
144
+ break;
145
+ case 2:
146
+ ms = +r[8] * 10;
147
+ break;
148
+ case 3:
149
+ ms = +r[8];
150
+ break;
151
+ case 4:
152
+ ms = +r[8] / 10;
153
+ break;
154
+ case 5:
155
+ ms = +r[8] / 100;
156
+ break;
157
+ case 6:
158
+ ms = +r[8] / 1000;
159
+ break;
160
+ case 7:
161
+ ms = +r[8] / 10000;
162
+ break;
163
+ default:
164
+ throw new Exception(`String '${str}' was not recognized as a valid TimeSpan.`);
165
+ }
166
+ }
167
+ return sign * create(d, h, m, s, ms);
168
+ }
169
+ }
170
+ throw new Exception(`String '${str}' was not recognized as a valid TimeSpan.`);
171
+ }
172
+ export function tryParse(v, defValue) {
173
+ try {
174
+ defValue.contents = parse(v);
175
+ return true;
176
+ }
177
+ catch {
178
+ return false;
179
+ }
180
+ }
@@ -0,0 +1,67 @@
1
+ import { Event } from "./Event.js";
2
+ export class Timer {
3
+ constructor(interval) {
4
+ this._enabled = false;
5
+ this._isDisposed = false;
6
+ this._intervalId = 0;
7
+ this._timeoutId = 0;
8
+ this.Interval = interval && interval > 0 ? interval : 100;
9
+ this.AutoReset = true;
10
+ this._elapsed = new Event();
11
+ }
12
+ Elapsed() {
13
+ return this._elapsed.Publish;
14
+ }
15
+ get Enabled() {
16
+ return this._enabled;
17
+ }
18
+ set Enabled(x) {
19
+ if (!this._isDisposed && this._enabled !== x) {
20
+ this._enabled = x;
21
+ if (this._enabled) {
22
+ if (this.AutoReset) {
23
+ this._intervalId = setInterval(() => {
24
+ if (!this.AutoReset) {
25
+ this.Enabled = false;
26
+ }
27
+ this._elapsed.Trigger(new Date());
28
+ }, this.Interval);
29
+ }
30
+ else {
31
+ this._timeoutId = setTimeout(() => {
32
+ this.Enabled = false;
33
+ this._timeoutId = 0;
34
+ if (this.AutoReset) {
35
+ this.Enabled = true;
36
+ }
37
+ this._elapsed.Trigger(new Date());
38
+ }, this.Interval);
39
+ }
40
+ }
41
+ else {
42
+ if (this._timeoutId) {
43
+ clearTimeout(this._timeoutId);
44
+ this._timeoutId = 0;
45
+ }
46
+ if (this._intervalId) {
47
+ clearInterval(this._intervalId);
48
+ this._intervalId = 0;
49
+ }
50
+ }
51
+ }
52
+ }
53
+ Dispose() {
54
+ this.Enabled = false;
55
+ this._isDisposed = true;
56
+ }
57
+ Close() {
58
+ this.Dispose();
59
+ }
60
+ Start() {
61
+ this.Enabled = true;
62
+ }
63
+ Stop() {
64
+ this.Enabled = false;
65
+ }
66
+ }
67
+ export default Timer;