compostjs 0.0.11 → 0.1.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 (143) hide show
  1. package/dist/compost.js +34 -28
  2. package/dist/core.js +94 -73
  3. package/dist/fable_modules/fable-library-js.4.28.0/Array.d.ts +123 -0
  4. package/dist/fable_modules/fable-library-js.4.28.0/Array.js +1242 -0
  5. package/dist/fable_modules/fable-library-js.4.28.0/Async.d.ts +26 -0
  6. package/dist/fable_modules/fable-library-js.4.28.0/Async.js +145 -0
  7. package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.d.ts +59 -0
  8. package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.js +183 -0
  9. package/dist/fable_modules/fable-library-js.4.28.0/BigInt.d.ts +115 -0
  10. package/dist/fable_modules/fable-library-js.4.28.0/BigInt.js +283 -0
  11. package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.d.ts +27 -0
  12. package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.js +138 -0
  13. package/dist/fable_modules/fable-library-js.4.28.0/Boolean.d.ts +3 -0
  14. package/dist/fable_modules/fable-library-js.4.28.0/Boolean.js +21 -0
  15. package/dist/fable_modules/fable-library-js.4.28.0/CHANGELOG.md +100 -0
  16. package/dist/fable_modules/fable-library-js.4.28.0/Char.d.ts +65 -0
  17. package/dist/fable_modules/fable-library-js.4.28.0/Char.js +169 -0
  18. package/dist/fable_modules/fable-library-js.4.28.0/Choice.d.ts +121 -0
  19. package/dist/fable_modules/fable-library-js.4.28.0/Choice.js +184 -0
  20. package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.d.ts +7 -0
  21. package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.js +182 -0
  22. package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.d.ts +9 -0
  23. package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.js +21 -0
  24. package/dist/fable_modules/fable-library-js.4.28.0/Date.d.ts +70 -0
  25. package/dist/fable_modules/fable-library-js.4.28.0/Date.js +748 -0
  26. package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.d.ts +63 -0
  27. package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.js +268 -0
  28. package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.d.ts +18 -0
  29. package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.js +124 -0
  30. package/dist/fable_modules/fable-library-js.4.28.0/Decimal.d.ts +45 -0
  31. package/dist/fable_modules/fable-library-js.4.28.0/Decimal.js +212 -0
  32. package/dist/fable_modules/fable-library-js.4.28.0/Double.d.ts +11 -0
  33. package/dist/fable_modules/fable-library-js.4.28.0/Double.js +46 -0
  34. package/dist/fable_modules/fable-library-js.4.28.0/Encoding.d.ts +12 -0
  35. package/dist/fable_modules/fable-library-js.4.28.0/Encoding.js +173 -0
  36. package/dist/fable_modules/fable-library-js.4.28.0/Event.d.ts +31 -0
  37. package/dist/fable_modules/fable-library-js.4.28.0/Event.js +93 -0
  38. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.d.ts +7 -0
  39. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.js +27 -0
  40. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.d.ts +12 -0
  41. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.js +27 -0
  42. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.d.ts +17 -0
  43. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.js +69 -0
  44. package/dist/fable_modules/fable-library-js.4.28.0/Global.d.ts +24 -0
  45. package/dist/fable_modules/fable-library-js.4.28.0/Global.js +8 -0
  46. package/dist/fable_modules/fable-library-js.4.28.0/Guid.d.ts +10 -0
  47. package/dist/fable_modules/fable-library-js.4.28.0/Guid.js +142 -0
  48. package/dist/fable_modules/fable-library-js.4.28.0/Int32.d.ts +28 -0
  49. package/dist/fable_modules/fable-library-js.4.28.0/Int32.js +135 -0
  50. package/dist/fable_modules/fable-library-js.4.28.0/List.d.ts +143 -0
  51. package/dist/fable_modules/fable-library-js.4.28.0/List.js +1273 -0
  52. package/dist/fable_modules/fable-library-js.4.28.0/Long.d.ts +3 -0
  53. package/dist/fable_modules/fable-library-js.4.28.0/Long.js +46 -0
  54. package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.d.ts +25 -0
  55. package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.js +93 -0
  56. package/dist/fable_modules/fable-library-js.4.28.0/Map.d.ts +178 -0
  57. package/dist/fable_modules/fable-library-js.4.28.0/Map.js +1396 -0
  58. package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.d.ts +12 -0
  59. package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.js +127 -0
  60. package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.d.ts +52 -0
  61. package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.js +327 -0
  62. package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.d.ts +39 -0
  63. package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.js +233 -0
  64. package/dist/fable_modules/fable-library-js.4.28.0/Native.d.ts +2 -0
  65. package/dist/fable_modules/fable-library-js.4.28.0/Native.js +8 -0
  66. package/dist/fable_modules/fable-library-js.4.28.0/Numeric.d.ts +19 -0
  67. package/dist/fable_modules/fable-library-js.4.28.0/Numeric.js +71 -0
  68. package/dist/fable_modules/fable-library-js.4.28.0/Observable.d.ts +32 -0
  69. package/dist/fable_modules/fable-library-js.4.28.0/Observable.js +113 -0
  70. package/dist/fable_modules/fable-library-js.4.28.0/Option.d.ts +28 -0
  71. package/dist/fable_modules/fable-library-js.4.28.0/Option.js +96 -0
  72. package/dist/fable_modules/fable-library-js.4.28.0/README.md +3 -0
  73. package/dist/fable_modules/fable-library-js.4.28.0/Random.d.ts +37 -0
  74. package/dist/fable_modules/fable-library-js.4.28.0/Random.js +170 -0
  75. package/dist/fable_modules/fable-library-js.4.28.0/Range.d.ts +12 -0
  76. package/dist/fable_modules/fable-library-js.4.28.0/Range.js +45 -0
  77. package/dist/fable_modules/fable-library-js.4.28.0/Reflection.d.ts +119 -0
  78. package/dist/fable_modules/fable-library-js.4.28.0/Reflection.js +461 -0
  79. package/dist/fable_modules/fable-library-js.4.28.0/RegExp.d.ts +10 -0
  80. package/dist/fable_modules/fable-library-js.4.28.0/RegExp.js +131 -0
  81. package/dist/fable_modules/fable-library-js.4.28.0/Result.d.ts +37 -0
  82. package/dist/fable_modules/fable-library-js.4.28.0/Result.js +165 -0
  83. package/dist/fable_modules/fable-library-js.4.28.0/Seq.d.ts +165 -0
  84. package/dist/fable_modules/fable-library-js.4.28.0/Seq.js +1378 -0
  85. package/dist/fable_modules/fable-library-js.4.28.0/Seq2.d.ts +18 -0
  86. package/dist/fable_modules/fable-library-js.4.28.0/Seq2.js +111 -0
  87. package/dist/fable_modules/fable-library-js.4.28.0/Set.d.ts +190 -0
  88. package/dist/fable_modules/fable-library-js.4.28.0/Set.js +1789 -0
  89. package/dist/fable_modules/fable-library-js.4.28.0/String.d.ts +58 -0
  90. package/dist/fable_modules/fable-library-js.4.28.0/String.js +554 -0
  91. package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.d.ts +79 -0
  92. package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.js +317 -0
  93. package/dist/fable_modules/fable-library-js.4.28.0/System.Text.d.ts +38 -0
  94. package/dist/fable_modules/fable-library-js.4.28.0/System.Text.js +162 -0
  95. package/dist/fable_modules/fable-library-js.4.28.0/SystemException.d.ts +5 -0
  96. package/dist/fable_modules/fable-library-js.4.28.0/SystemException.js +5 -0
  97. package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.d.ts +15 -0
  98. package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.js +122 -0
  99. package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.d.ts +34 -0
  100. package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.js +177 -0
  101. package/dist/fable_modules/fable-library-js.4.28.0/Timer.d.ts +19 -0
  102. package/dist/fable_modules/fable-library-js.4.28.0/Timer.js +67 -0
  103. package/dist/fable_modules/fable-library-js.4.28.0/Types.d.ts +58 -0
  104. package/dist/fable_modules/fable-library-js.4.28.0/Types.js +208 -0
  105. package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.d.ts +2 -0
  106. package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.js +4 -0
  107. package/dist/fable_modules/fable-library-js.4.28.0/Uri.d.ts +31 -0
  108. package/dist/fable_modules/fable-library-js.4.28.0/Uri.js +159 -0
  109. package/dist/fable_modules/fable-library-js.4.28.0/Util.d.ts +210 -0
  110. package/dist/fable_modules/fable-library-js.4.28.0/Util.js +769 -0
  111. package/dist/fable_modules/fable-library-js.4.28.0/big.d.ts +338 -0
  112. package/dist/fable_modules/fable-library-js.4.28.0/lib/big.d.ts +5 -0
  113. package/dist/fable_modules/fable-library-js.4.28.0/lib/big.js +825 -0
  114. package/dist/fable_modules/fable-library-js.4.28.0/package.json +24 -0
  115. package/dist/fable_modules/project_cracked.json +1 -0
  116. package/package.json +5 -4
  117. package/.claude/settings.local.json +0 -11
  118. package/copy-latest.sh +0 -1
  119. package/dist/fable-library.2.10.1/Array.js +0 -1336
  120. package/dist/fable-library.2.10.1/Async.js +0 -121
  121. package/dist/fable-library.2.10.1/AsyncBuilder.js +0 -200
  122. package/dist/fable-library.2.10.1/Date.js +0 -501
  123. package/dist/fable-library.2.10.1/Decimal.js +0 -208
  124. package/dist/fable-library.2.10.1/Event.js +0 -193
  125. package/dist/fable-library.2.10.1/Int32.js +0 -157
  126. package/dist/fable-library.2.10.1/List.js +0 -1234
  127. package/dist/fable-library.2.10.1/Long.js +0 -155
  128. package/dist/fable-library.2.10.1/Map.js +0 -1292
  129. package/dist/fable-library.2.10.1/MutableMap.js +0 -360
  130. package/dist/fable-library.2.10.1/MutableSet.js +0 -279
  131. package/dist/fable-library.2.10.1/Observable.js +0 -131
  132. package/dist/fable-library.2.10.1/Option.js +0 -118
  133. package/dist/fable-library.2.10.1/Reflection.js +0 -345
  134. package/dist/fable-library.2.10.1/RegExp.js +0 -118
  135. package/dist/fable-library.2.10.1/Seq.js +0 -917
  136. package/dist/fable-library.2.10.1/Set.js +0 -1692
  137. package/dist/fable-library.2.10.1/String.js +0 -679
  138. package/dist/fable-library.2.10.1/Types.js +0 -308
  139. package/dist/fable-library.2.10.1/Util.js +0 -761
  140. package/dist/helpers.js +0 -31
  141. package/dist/lib/big.js +0 -905
  142. package/dist/lib/long.js +0 -1375
  143. package/index.html +0 -49
@@ -0,0 +1,338 @@
1
+ // Type definitions for big.js 6.0
2
+ // Project: https://github.com/MikeMcl/big.js/
3
+ // Definitions by: Steve Ognibene <https://github.com/nycdotnet>
4
+ // Roman Nuritdinov (Ky6uk) <https://github.com/Ky6uk>
5
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
+
7
+ import { CustomNumeric } from "../Numeric.js";
8
+
9
+ export type BigSource = number | string | Big;
10
+
11
+ export const enum Comparison {
12
+ GT = 1,
13
+ EQ = 0,
14
+ LT = -1,
15
+ }
16
+
17
+ export const enum RoundingMode {
18
+ /**
19
+ * Rounds towards zero.
20
+ * I.e. truncate, no rounding.
21
+ */
22
+ RoundDown = 0,
23
+ /**
24
+ * Rounds towards nearest neighbour.
25
+ * If equidistant, rounds away from zero.
26
+ */
27
+ RoundHalfUp = 1,
28
+ /**
29
+ * Rounds towards nearest neighbour.
30
+ * If equidistant, rounds towards even neighbour.
31
+ */
32
+ RoundHalfEven = 2,
33
+ /**
34
+ * Rounds away from zero.
35
+ */
36
+ RoundUp = 3,
37
+ }
38
+
39
+ export interface BigConstructor {
40
+ /**
41
+ * Returns a new instance of a Big number object
42
+ *
43
+ * String values may be in exponential, as well as normal (non-exponential) notation.
44
+ * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.
45
+ * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.
46
+ * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.
47
+ *
48
+ * @throws `NaN` on an invalid value.
49
+ */
50
+ new (value: BigSource): Big;
51
+
52
+ /**
53
+ * Returns a new instance of a Big number object
54
+ *
55
+ * String values may be in exponential, as well as normal (non-exponential) notation.
56
+ * There is no limit to the number of digits of a string value (other than that of Javascript's maximum array size), but the largest recommended exponent magnitude is 1e+6.
57
+ * Infinity, NaN and hexadecimal literal strings, e.g. '0xff', are not valid.
58
+ * String values in octal literal form will be interpreted as decimals, e.g. '011' is 11, not 9.
59
+ *
60
+ * @throws `NaN` on an invalid value.
61
+ */
62
+ (value: BigSource): Big;
63
+
64
+ /**
65
+ * Create an additional Big number constructor
66
+ *
67
+ * Values created with the returned constructor will have a separate set of configuration values.
68
+ * This can be used to create Big objects with different DP and RM values.
69
+ * Big numbers created by different constructors can be used together in operations, and it is the DP and RM setting of the Big number that an operation is called upon that will apply.
70
+ * In the interest of memory efficiency, all Big number constructors share the same prototype object,
71
+ * so while the DP and RM (and any other own properties) of a constructor are isolated and untouchable by another, its prototype methods are not.
72
+ */
73
+ (): BigConstructor;
74
+
75
+ /**
76
+ * The maximum number of decimal places of the results of operations involving division.
77
+ * It is relevant only to the div and sqrt methods, and the pow method when the exponent is negative.
78
+ *
79
+ * 0 to 1e+6 inclusive
80
+ * Default value: 20
81
+ */
82
+ DP: number;
83
+ /**
84
+ * The rounding mode used in the above operations and by round, toExponential, toFixed and toPrecision.
85
+ * Default value: 1
86
+ */
87
+ RM: number;
88
+ /**
89
+ * The negative exponent value at and below which toString returns exponential notation.
90
+ *
91
+ * -1e+6 to 0 inclusive
92
+ * Default value: -7
93
+ */
94
+ NE: number;
95
+ /**
96
+ * The positive exponent value at and above which toString returns exponential notation.
97
+ *
98
+ * 0 to 1e+6 inclusive
99
+ * Default value: 21
100
+ */
101
+ PE: number;
102
+ }
103
+
104
+ export interface Big extends CustomNumeric {
105
+ /** Returns a Big number whose value is the absolute value, i.e. the magnitude, of this Big number. */
106
+ abs(): Big;
107
+ /**
108
+ * Returns a Big number whose value is the value of this Big number plus n - alias for .plus().
109
+ *
110
+ * @throws `NaN` if n is invalid.
111
+ */
112
+ add(n: BigSource): Big;
113
+ /**
114
+ * Compare the values.
115
+ *
116
+ * @throws `NaN` if n is invalid.
117
+ */
118
+ cmp(n: BigSource): Comparison;
119
+ /**
120
+ * Returns a Big number whose value is the value of this Big number divided by n.
121
+ *
122
+ * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.
123
+ *
124
+ * @throws `NaN` if n is invalid.
125
+ * @throws `±Infinity` on division by zero.
126
+ * @throws `NaN` on division of zero by zero.
127
+ */
128
+ div(n: BigSource): Big;
129
+ /**
130
+ * Returns true if the value of this Big equals the value of n, otherwise returns false.
131
+ *
132
+ * @throws `NaN` if n is invalid.
133
+ */
134
+ eq(n: BigSource): boolean;
135
+ /**
136
+ * Returns true if the value of this Big is greater than the value of n, otherwise returns false.
137
+ *
138
+ * @throws `NaN` if n is invalid.
139
+ */
140
+ gt(n: BigSource): boolean;
141
+ /**
142
+ * Returns true if the value of this Big is greater than or equal to the value of n, otherwise returns false.
143
+ *
144
+ * @throws `NaN` if n is invalid.
145
+ */
146
+ gte(n: BigSource): boolean;
147
+ /**
148
+ * Returns true if the value of this Big is less than the value of n, otherwise returns false.
149
+ *
150
+ * @throws `NaN` if n is invalid.
151
+ */
152
+ lt(n: BigSource): boolean;
153
+ /**
154
+ * Returns true if the value of this Big is less than or equal to the value of n, otherwise returns false.
155
+ *
156
+ * @throws `NaN` if n is invalid.
157
+ */
158
+ lte(n: BigSource): boolean;
159
+ /**
160
+ * Returns a Big number whose value is the value of this Big number minus n.
161
+ *
162
+ * @throws `NaN` if n is invalid.
163
+ */
164
+ minus(n: BigSource): Big;
165
+ /**
166
+ * Returns a Big number whose value is the value of this Big number modulo n, i.e. the integer remainder of dividing this Big number by n.
167
+ *
168
+ * The result will have the same sign as this Big number, and it will match that of Javascript's % operator (within the limits of its precision) and BigDecimal's remainder method.
169
+ *
170
+ * @throws `NaN` if n is negative or otherwise invalid.
171
+ */
172
+ mod(n: BigSource): Big;
173
+ /**
174
+ * Returns a Big number whose value is the value of this Big number times n - alias for .times().
175
+ *
176
+ * @throws `NaN` if n is invalid.
177
+ */
178
+ mul(n: BigSource): Big;
179
+ /**
180
+ * Returns a Big number whose value is the value of this Big number plus n.
181
+ *
182
+ * @throws `NaN` if n is invalid.
183
+ */
184
+ plus(n: BigSource): Big;
185
+ /**
186
+ * Returns a Big number whose value is the value of this Big number raised to the power exp.
187
+ *
188
+ * If exp is negative and the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.
189
+ *
190
+ * @param exp The power to raise the number to, -1e+6 to 1e+6 inclusive
191
+ * @throws `!pow!` if exp is invalid.
192
+ *
193
+ * Note: High value exponents may cause this method to be slow to return.
194
+ */
195
+ pow(exp: number): Big;
196
+ /**
197
+ * Returns a Big number whose value is the value of this Big number rounded using rounding mode rm to a maximum of dp decimal places.
198
+ *
199
+ * @param dp Decimal places, 0 to 1e+6 inclusive
200
+ * @param rm The rounding mode, one of the RoundingMode enumeration values
201
+ * @throws `!round!` if dp is invalid.
202
+ * @throws `!Big.RM!` if rm is invalid.
203
+ */
204
+ round(dp?: number, rm?: RoundingMode): Big;
205
+ /**
206
+ * Returns a Big number whose value is the square root of this Big number.
207
+ *
208
+ * If the result has more fraction digits than is specified by Big.DP, it will be rounded to Big.DP decimal places using rounding mode Big.RM.
209
+ *
210
+ * @throws `NaN` if this Big number is negative.
211
+ */
212
+ sqrt(): Big;
213
+ /**
214
+ * Returns a Big number whose value is the value of this Big number minus n - alias for .minus().
215
+ *
216
+ * @throws `NaN` if n is invalid.
217
+ */
218
+ sub(n: BigSource): Big;
219
+ /**
220
+ * Returns a Big number whose value is the value of this Big number times n.
221
+ *
222
+ * @throws `NaN` if n is invalid.
223
+ */
224
+ times(n: BigSource): Big;
225
+ /**
226
+ * Returns a string representing the value of this Big number in exponential notation to a fixed number of decimal places dp.
227
+ *
228
+ * If the value of this Big number in exponential notation has more digits to the right of the decimal point than is specified by dp,
229
+ * the return value will be rounded to dp decimal places using rounding mode Big.RM.
230
+ *
231
+ * If the value of this Big number in exponential notation has fewer digits to the right of the decimal point than is specified by dp, the return value will be appended with zeros accordingly.
232
+ *
233
+ * If dp is omitted, or is null or undefined, the number of digits after the decimal point defaults to the minimum number of digits necessary to represent the value exactly.
234
+ *
235
+ * @param dp Decimal places, 0 to 1e+6 inclusive
236
+ * @throws `!toFix!` if dp is invalid.
237
+ */
238
+ toExponential(dp?: number): string;
239
+ /**
240
+ * Returns a string representing the value of this Big number in normal notation to a fixed number of decimal places dp.
241
+ *
242
+ * If the value of this Big number in normal notation has more digits to the right of the decimal point than is specified by dp,
243
+ * the return value will be rounded to dp decimal places using rounding mode Big.RM.
244
+ *
245
+ * If the value of this Big number in normal notation has fewer fraction digits then is specified by dp, the return value will be appended with zeros accordingly.
246
+ *
247
+ * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation.
248
+ *
249
+ * If dp is omitted, or is null or undefined, then the return value is simply the value in normal notation.
250
+ * This is also unlike Number.prototype.toFixed, which returns the value to zero decimal places.
251
+ *
252
+ * @param dp Decimal places, 0 to 1e+6 inclusive
253
+ * @throws `!toFix!` if dp is invalid.
254
+ */
255
+ toFixed(dp?: number): string;
256
+ /**
257
+ * Returns a string representing the value of this Big number to the specified number of significant digits sd.
258
+ *
259
+ * If the value of this Big number has more digits than is specified by sd, the return value will be rounded to sd significant digits using rounding mode Big.RM.
260
+ *
261
+ * If the value of this Big number has fewer digits than is specified by sd, the return value will be appended with zeros accordingly.
262
+ *
263
+ * If sd is less than the number of digits necessary to represent the integer part of the value in normal notation, then exponential notation is used.
264
+ *
265
+ * If sd is omitted, or is null or undefined, then the return value is the same as .toString().
266
+ *
267
+ * @param sd Significant digits, 1 to 1e+6 inclusive
268
+ * @throws `!toPre!` if sd is invalid.
269
+ */
270
+ toPrecision(sd?: number): string;
271
+ /**
272
+ * Returns a string representing the value of this Big number.
273
+ *
274
+ * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.
275
+ *
276
+ * The point at which toString returns exponential rather than normal notation can be adjusted by changing
277
+ * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.
278
+ */
279
+ toString(): string;
280
+ /**
281
+ * Returns a primitive number representing the value of this Big number.
282
+ *
283
+ * If Big.strict is true an error will be thrown if toNumber is called on a Big number which cannot be converted to a primitive number without a loss of precision.
284
+ *
285
+ * @since 6.0
286
+ */
287
+ toNumber(): number;
288
+ /**
289
+ * Returns a string representing the value of this Big number.
290
+ *
291
+ * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.
292
+ *
293
+ * The point at which toString returns exponential rather than normal notation can be adjusted by changing
294
+ * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.
295
+ */
296
+ valueOf(): string;
297
+ /**
298
+ * Returns a string representing the value of this Big number.
299
+ *
300
+ * If this Big number has a positive exponent that is equal to or greater than 21, or a negative exponent equal to or less than -7, then exponential notation is returned.
301
+ *
302
+ * The point at which toString returns exponential rather than normal notation can be adjusted by changing
303
+ * the value of Big.E_POS and Big.E_NEG. By default, Big numbers correspond to Javascript's number type in this regard.
304
+ */
305
+ toJSON(): string;
306
+ /**
307
+ * Returns an array of single digits
308
+ */
309
+ c: number[];
310
+ /**
311
+ * Returns the exponent, Integer, -1e+6 to 1e+6 inclusive
312
+ */
313
+ e: number;
314
+ /**
315
+ * Returns the sign, -1 or 1
316
+ */
317
+ s: number;
318
+ }
319
+
320
+ // We want the exported symbol 'Big' to represent two things:
321
+ // - The Big interface, when used in a type context.
322
+ // - The BigConstructor instance, when used in a value context.
323
+ export const Big: BigConstructor;
324
+
325
+ // The default export is the same as type/value combo symbol 'Big'.
326
+ export default Big;
327
+
328
+ // If you pull in big.js via a <script> tag, the global symbol 'Big' is automatically defined.
329
+ // To let TypeScript know that, add this to your project's global types file, e.g. "types.d.ts":
330
+ //
331
+ // import BigJs from 'big.js';
332
+ // declare global {
333
+ // const Big = BigJs;
334
+ // type Big = BigJs;
335
+ // }
336
+ //
337
+ // There is a way to have TypeScript know to do this automatically (using "export as namespace"),
338
+ // but I couldn't get it working correctly.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @type object
3
+ */
4
+ export const Big: object;
5
+ export default Big;