@fable-org/fable-library-ts 2.0.0-beta.3 → 2.0.0-beta.5
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.
- package/Array.ts +1385 -1378
- package/Async.ts +13 -12
- package/AsyncBuilder.ts +10 -11
- package/BigInt.ts +6 -6
- package/BitConverter.ts +3 -3
- package/Boolean.ts +3 -2
- package/CHANGELOG.md +12 -0
- package/Char.ts +38 -35
- package/Choice.ts +326 -301
- package/CollectionUtil.ts +4 -4
- package/Date.ts +67 -62
- package/DateOffset.ts +48 -57
- package/DateOnly.ts +8 -8
- package/Decimal.ts +9 -9
- package/Double.ts +3 -2
- package/Encoding.ts +1 -1
- package/Event.ts +3 -3
- package/FSharp.Collections.ts +53 -34
- package/FSharp.Core.CompilerServices.ts +38 -37
- package/FSharp.Core.ts +186 -185
- package/Global.ts +80 -37
- package/Guid.ts +7 -6
- package/Int32.ts +20 -17
- package/List.ts +1429 -1417
- package/Long.ts +6 -5
- package/MailboxProcessor.ts +8 -7
- package/Map.ts +1550 -1552
- package/MapUtil.ts +5 -5
- package/MutableMap.ts +358 -345
- package/MutableSet.ts +250 -249
- package/Native.ts +19 -11
- package/Numeric.ts +1 -1
- package/Observable.ts +3 -3
- package/Option.ts +10 -4
- package/Random.ts +196 -194
- package/Range.ts +57 -56
- package/Reflection.ts +73 -40
- package/RegExp.ts +5 -3
- package/Result.ts +201 -196
- package/Seq.ts +1517 -1525
- package/Seq2.ts +130 -129
- package/Set.ts +1955 -1955
- package/String.ts +41 -38
- package/System.Collections.Generic.ts +401 -380
- package/System.Text.ts +204 -203
- package/System.ts +366 -0
- package/TimeOnly.ts +10 -10
- package/TimeSpan.ts +11 -11
- package/Timer.ts +2 -2
- package/Types.ts +1 -19
- package/Uri.ts +13 -10
- package/Util.ts +77 -21
- package/package.json +22 -22
- package/tsconfig.json +18 -5
- package/SystemException.ts +0 -7
package/Long.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { getPrefix, isValid } from "./Int32.
|
|
2
|
-
import { fromString } from "./BigInt.
|
|
3
|
-
import { FSharpRef } from "./Types.
|
|
1
|
+
import { getPrefix, isValid } from "./Int32.ts";
|
|
2
|
+
import { fromString } from "./BigInt.ts";
|
|
3
|
+
import { FSharpRef } from "./Types.ts";
|
|
4
|
+
import { Exception } from "./Util.ts";
|
|
4
5
|
|
|
5
6
|
function getMaxValue(unsigned: boolean, radix: number, isNegative: boolean) {
|
|
6
7
|
switch (radix) {
|
|
@@ -17,7 +18,7 @@ function getMaxValue(unsigned: boolean, radix: number, isNegative: boolean) {
|
|
|
17
18
|
case 16: return unsigned ?
|
|
18
19
|
"FFFFFFFFFFFFFFFF" :
|
|
19
20
|
(isNegative ? "8000000000000000" : "7FFFFFFFFFFFFFFF");
|
|
20
|
-
default: throw new
|
|
21
|
+
default: throw new Exception("Invalid radix.");
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -36,7 +37,7 @@ export function parse(str: string, style: number, unsigned: boolean, _bitsize: n
|
|
|
36
37
|
return fromString(str);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
throw new
|
|
40
|
+
throw new Exception(`The input string ${str} was not in a correct format.`);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
export function tryParse(str: string, style: number, unsigned: boolean, bitsize: number, defValue: FSharpRef<bigint>) {
|
package/MailboxProcessor.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defaultCancellationToken } from "./Async.
|
|
2
|
-
import { fromContinuations } from "./Async.
|
|
3
|
-
import { startImmediate } from "./Async.
|
|
4
|
-
import { Async } from "./AsyncBuilder.
|
|
5
|
-
import { Continuation, Continuations } from "./AsyncBuilder.
|
|
6
|
-
import { CancellationToken } from "./AsyncBuilder.
|
|
1
|
+
import { defaultCancellationToken } from "./Async.ts";
|
|
2
|
+
import { fromContinuations } from "./Async.ts";
|
|
3
|
+
import { startImmediate } from "./Async.ts";
|
|
4
|
+
import { Async } from "./AsyncBuilder.ts";
|
|
5
|
+
import { Continuation, Continuations } from "./AsyncBuilder.ts";
|
|
6
|
+
import { CancellationToken } from "./AsyncBuilder.ts";
|
|
7
|
+
import { Exception } from "./Util.ts";
|
|
7
8
|
|
|
8
9
|
class QueueCell<Msg> {
|
|
9
10
|
public value: Msg;
|
|
@@ -79,7 +80,7 @@ export function startInstance<Msg>($this: MailboxProcessor<Msg>) {
|
|
|
79
80
|
export function receive<Msg>($this: MailboxProcessor<Msg>) {
|
|
80
81
|
return fromContinuations((conts: Continuations<Msg>) => {
|
|
81
82
|
if ($this.continuation) {
|
|
82
|
-
throw new
|
|
83
|
+
throw new Exception("Receive can only be called once!");
|
|
83
84
|
}
|
|
84
85
|
$this.continuation = conts[0];
|
|
85
86
|
__processEvents($this);
|