@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.
Files changed (55) hide show
  1. package/Array.ts +1385 -1378
  2. package/Async.ts +13 -12
  3. package/AsyncBuilder.ts +10 -11
  4. package/BigInt.ts +6 -6
  5. package/BitConverter.ts +3 -3
  6. package/Boolean.ts +3 -2
  7. package/CHANGELOG.md +12 -0
  8. package/Char.ts +38 -35
  9. package/Choice.ts +326 -301
  10. package/CollectionUtil.ts +4 -4
  11. package/Date.ts +67 -62
  12. package/DateOffset.ts +48 -57
  13. package/DateOnly.ts +8 -8
  14. package/Decimal.ts +9 -9
  15. package/Double.ts +3 -2
  16. package/Encoding.ts +1 -1
  17. package/Event.ts +3 -3
  18. package/FSharp.Collections.ts +53 -34
  19. package/FSharp.Core.CompilerServices.ts +38 -37
  20. package/FSharp.Core.ts +186 -185
  21. package/Global.ts +80 -37
  22. package/Guid.ts +7 -6
  23. package/Int32.ts +20 -17
  24. package/List.ts +1429 -1417
  25. package/Long.ts +6 -5
  26. package/MailboxProcessor.ts +8 -7
  27. package/Map.ts +1550 -1552
  28. package/MapUtil.ts +5 -5
  29. package/MutableMap.ts +358 -345
  30. package/MutableSet.ts +250 -249
  31. package/Native.ts +19 -11
  32. package/Numeric.ts +1 -1
  33. package/Observable.ts +3 -3
  34. package/Option.ts +10 -4
  35. package/Random.ts +196 -194
  36. package/Range.ts +57 -56
  37. package/Reflection.ts +73 -40
  38. package/RegExp.ts +5 -3
  39. package/Result.ts +201 -196
  40. package/Seq.ts +1517 -1525
  41. package/Seq2.ts +130 -129
  42. package/Set.ts +1955 -1955
  43. package/String.ts +41 -38
  44. package/System.Collections.Generic.ts +401 -380
  45. package/System.Text.ts +204 -203
  46. package/System.ts +366 -0
  47. package/TimeOnly.ts +10 -10
  48. package/TimeSpan.ts +11 -11
  49. package/Timer.ts +2 -2
  50. package/Types.ts +1 -19
  51. package/Uri.ts +13 -10
  52. package/Util.ts +77 -21
  53. package/package.json +22 -22
  54. package/tsconfig.json +18 -5
  55. package/SystemException.ts +0 -7
package/Long.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { getPrefix, isValid } from "./Int32.js";
2
- import { fromString } from "./BigInt.js";
3
- import { FSharpRef } from "./Types.js";
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 Error("Invalid radix.");
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 Error(`The input string ${str} was not in a correct format.`);
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>) {
@@ -1,9 +1,10 @@
1
- import { defaultCancellationToken } from "./Async.js";
2
- import { fromContinuations } from "./Async.js";
3
- import { startImmediate } from "./Async.js";
4
- import { Async } from "./AsyncBuilder.js";
5
- import { Continuation, Continuations } from "./AsyncBuilder.js";
6
- import { CancellationToken } from "./AsyncBuilder.js";
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 Error("Receive can only be called once!");
83
+ throw new Exception("Receive can only be called once!");
83
84
  }
84
85
  $this.continuation = conts[0];
85
86
  __processEvents($this);