@fable-org/fable-library-ts 1.4.0 → 1.4.1

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 CHANGED
@@ -51,7 +51,7 @@ export function last<T>(array: T[]): T {
51
51
 
52
52
  export function tryLast<T>(array: T[]): Option<T> {
53
53
  if (array.length === 0) {
54
- return void 0;
54
+ return undefined;
55
55
  }
56
56
  else {
57
57
  return some(item_2(array.length - 1, array));
@@ -228,7 +228,7 @@ export function indexOf<T>(array: T[], item_1: T, start: Option<int32>, count: O
228
228
  }
229
229
 
230
230
  export function contains<T>(value: T, array: T[], eq: IEqualityComparer<T>): boolean {
231
- return indexOf<T>(array, value, void 0, void 0, eq) >= 0;
231
+ return indexOf<T>(array, value, undefined, undefined, eq) >= 0;
232
232
  }
233
233
 
234
234
  export function empty<$a>(cons: any): $a[] {
@@ -397,7 +397,7 @@ export function insertRangeInPlace<T>(index: int32, range: Iterable<T>, array: T
397
397
  }
398
398
 
399
399
  export function removeInPlace<T>(item_1: T, array: T[], eq: IEqualityComparer<T>): boolean {
400
- const i: int32 = indexOf<T>(array, item_1, void 0, void 0, eq) | 0;
400
+ const i: int32 = indexOf<T>(array, item_1, undefined, undefined, eq) | 0;
401
401
  if (i > -1) {
402
402
  array.splice(i, 1);
403
403
  return true;
@@ -471,7 +471,7 @@ export function tryFindIndex<T>(predicate: ((arg0: T) => boolean), array: T[]):
471
471
  return matchValue;
472
472
  }
473
473
  else {
474
- return void 0;
474
+ return undefined;
475
475
  }
476
476
  }
477
477
 
@@ -505,7 +505,7 @@ export function tryPick<$a, $b>(chooser: ((arg0: $a) => Option<$b>), array: $a[]
505
505
  while (true) {
506
506
  const i: int32 = i_mut;
507
507
  if (i >= array.length) {
508
- return void 0;
508
+ return undefined;
509
509
  }
510
510
  else {
511
511
  const matchValue: Option<$b> = chooser(item_2(i, array));
@@ -550,7 +550,7 @@ export function tryFindBack<$a>(predicate: ((arg0: $a) => boolean), array: $a[])
550
550
  while (true) {
551
551
  const i: int32 = i_mut;
552
552
  if (i < 0) {
553
- return void 0;
553
+ return undefined;
554
554
  }
555
555
  else if (predicate(item_2(i, array))) {
556
556
  return some(item_2(i, array));
@@ -614,7 +614,7 @@ export function tryFindIndexBack<$a>(predicate: ((arg0: $a) => boolean), array:
614
614
  while (true) {
615
615
  const i: int32 = i_mut;
616
616
  if (i < 0) {
617
- return void 0;
617
+ return undefined;
618
618
  }
619
619
  else if (predicate(item_2(i, array))) {
620
620
  return i;
@@ -983,7 +983,7 @@ export function tryExactlyOne<T>(array: T[]): Option<T> {
983
983
  return some(item_2(0, array));
984
984
  }
985
985
  else {
986
- return void 0;
986
+ return undefined;
987
987
  }
988
988
  }
989
989
 
@@ -998,7 +998,7 @@ export function head<T>(array: T[]): T {
998
998
 
999
999
  export function tryHead<T>(array: T[]): Option<T> {
1000
1000
  if (array.length === 0) {
1001
- return void 0;
1001
+ return undefined;
1002
1002
  }
1003
1003
  else {
1004
1004
  return some(item_2(0, array));
@@ -1032,7 +1032,7 @@ export function setItem<T>(array: T[], index: int32, value: T): void {
1032
1032
 
1033
1033
  export function tryItem<T>(index: int32, array: T[]): Option<T> {
1034
1034
  if ((index < 0) ? true : (index >= array.length)) {
1035
- return void 0;
1035
+ return undefined;
1036
1036
  }
1037
1037
  else {
1038
1038
  return some(array[index]);
package/CHANGELOG.md CHANGED
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
- ## 1.4.0 - 2024-03-18
10
+ ## 1.4.1 - 2024-06-13
11
+
12
+ ### Fixed
13
+
14
+ * [JS/TS] Fixed DateTime.MinValue, DateTime.MaxValue (#3836) (by @ncave)
15
+
16
+ ## 1.4.0 - 2024-03-20
11
17
 
12
18
  ### Added
13
19
 
package/Choice.ts CHANGED
@@ -285,7 +285,7 @@ export function Choice_tryValueIfChoice1Of2<T1, T2>(x: FSharpChoice$2_$union<T1,
285
285
  return some(x.fields[0]);
286
286
  }
287
287
  else {
288
- return void 0;
288
+ return undefined;
289
289
  }
290
290
  }
291
291
 
@@ -294,7 +294,7 @@ export function Choice_tryValueIfChoice2Of2<T1, T2>(x: FSharpChoice$2_$union<T1,
294
294
  return some(x.fields[0]);
295
295
  }
296
296
  else {
297
- return void 0;
297
+ return undefined;
298
298
  }
299
299
  }
300
300
 
package/Date.ts CHANGED
@@ -105,10 +105,10 @@ function dateToStringWithCustomFormat(date: Date, format: string, utc: boolean)
105
105
  cursorPos += tokenLength;
106
106
  switch (tokenLength) {
107
107
  case 1:
108
- result += localizedDate.getDate();
108
+ result += day(localizedDate);
109
109
  break;
110
110
  case 2:
111
- result += padWithZeros(localizedDate.getDate(), 2);
111
+ result += padWithZeros(day(localizedDate), 2);
112
112
  break;
113
113
  case 3:
114
114
  result += shortDays[dayOfWeek(localizedDate)];
@@ -498,12 +498,12 @@ export function getTicks(date: IDateTime | IDateTimeOffset) {
498
498
 
499
499
  export function minValue() {
500
500
  // This is "0001-01-01T00:00:00.000Z", actual JS min value is -8640000000000000
501
- return DateTime(-62135596800000, DateKind.Unspecified);
501
+ return DateTime(-62135596800000, DateKind.UTC);
502
502
  }
503
503
 
504
504
  export function maxValue() {
505
505
  // This is "9999-12-31T23:59:59.999Z", actual JS max value is 8640000000000000
506
- return DateTime(253402300799999, DateKind.Unspecified);
506
+ return DateTime(253402300799999, DateKind.UTC);
507
507
  }
508
508
 
509
509
  export function parseRaw(input: string): [Date, Offset] {
package/List.ts CHANGED
@@ -193,7 +193,7 @@ export function ListEnumerator$1_$ctor_3002E699<T>(xs: FSharpList<T>): ListEnume
193
193
  }
194
194
 
195
195
  export function FSharpList_get_Empty<T>(): FSharpList<T> {
196
- return new FSharpList(defaultOf(), void 0);
196
+ return new FSharpList(defaultOf(), undefined);
197
197
  }
198
198
 
199
199
  export function FSharpList_Cons_305B8EAC<T>(x: T, xs: FSharpList<T>): FSharpList<T> {
@@ -299,7 +299,7 @@ export function head<T>(xs: FSharpList<T>): T {
299
299
 
300
300
  export function tryHead<T>(xs: FSharpList<T>): Option<T> {
301
301
  if (FSharpList__get_IsEmpty<T>(xs)) {
302
- return void 0;
302
+ return undefined;
303
303
  }
304
304
  else {
305
305
  return some(FSharpList__get_Head<T>(xs));
@@ -315,7 +315,7 @@ export function tryLast<T>(xs_mut: FSharpList<T>): Option<T> {
315
315
  while (true) {
316
316
  const xs: FSharpList<T> = xs_mut;
317
317
  if (FSharpList__get_IsEmpty<T>(xs)) {
318
- return void 0;
318
+ return undefined;
319
319
  }
320
320
  else {
321
321
  const t: FSharpList<T> = FSharpList__get_Tail<T>(xs);
@@ -459,7 +459,7 @@ export function unfold<State, T>(gen: ((arg0: State) => Option<[T, State]>), sta
459
459
  const matchValue: Option<[T, State]> = gen(acc);
460
460
  if (matchValue != null) {
461
461
  acc_mut = value_1(matchValue)[1];
462
- node_mut = ((t = (new FSharpList(value_1(matchValue)[0], void 0)), (node.tail = t, t)));
462
+ node_mut = ((t = (new FSharpList(value_1(matchValue)[0], undefined)), (node.tail = t, t)));
463
463
  continue loop;
464
464
  }
465
465
  else {
@@ -478,13 +478,13 @@ export function unfold<State, T>(gen: ((arg0: State) => Option<[T, State]>), sta
478
478
  export function iterate<$a>(action: ((arg0: $a) => void), xs: FSharpList<$a>): void {
479
479
  fold<$a, void>((unitVar: void, x: $a): void => {
480
480
  action(x);
481
- }, void 0, xs);
481
+ }, undefined, xs);
482
482
  }
483
483
 
484
484
  export function iterate2<$a, $b>(action: ((arg0: $a, arg1: $b) => void), xs: FSharpList<$a>, ys: FSharpList<$b>): void {
485
485
  fold2<$a, $b, void>((unitVar: void, x: $a, y: $b): void => {
486
486
  action(x, y);
487
- }, void 0, xs, ys);
487
+ }, undefined, xs, ys);
488
488
  }
489
489
 
490
490
  export function iterateIndexed<$a>(action: ((arg0: int32, arg1: $a) => void), xs: FSharpList<$a>): void {
@@ -532,7 +532,7 @@ export function ofSeq<T>(xs: Iterable<T>): FSharpList<T> {
532
532
  try {
533
533
  while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
534
534
  const x: T = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
535
- node = ((xs_3 = node, (t = (new FSharpList(x, void 0)), (xs_3.tail = t, t))));
535
+ node = ((xs_3 = node, (t = (new FSharpList(x, undefined)), (xs_3.tail = t, t))));
536
536
  }
537
537
  }
538
538
  finally {
@@ -550,7 +550,7 @@ export function concat<T>(lists: Iterable<FSharpList<T>>): FSharpList<T> {
550
550
  let node: FSharpList<T> = root;
551
551
  const action = (xs: FSharpList<T>): void => {
552
552
  node = fold<T, FSharpList<T>>((acc: FSharpList<T>, x: T): FSharpList<T> => {
553
- const t: FSharpList<T> = new FSharpList(x, void 0);
553
+ const t: FSharpList<T> = new FSharpList(x, undefined);
554
554
  acc.tail = t;
555
555
  return t;
556
556
  }, node, xs);
@@ -583,14 +583,14 @@ export function scan<State, T>(folder: ((arg0: State, arg1: T) => State), state:
583
583
  let xs_4: FSharpList<State>, t_2: FSharpList<State>;
584
584
  const root: FSharpList<State> = FSharpList_get_Empty<State>();
585
585
  let node: FSharpList<State>;
586
- const t: FSharpList<State> = new FSharpList(state, void 0);
586
+ const t: FSharpList<State> = new FSharpList(state, undefined);
587
587
  root.tail = t;
588
588
  node = t;
589
589
  let acc: State = state;
590
590
  let xs_3: FSharpList<T> = xs;
591
591
  while (!FSharpList__get_IsEmpty<T>(xs_3)) {
592
592
  acc = folder(acc, FSharpList__get_Head<T>(xs_3));
593
- node = ((xs_4 = node, (t_2 = (new FSharpList(acc, void 0)), (xs_4.tail = t_2, t_2))));
593
+ node = ((xs_4 = node, (t_2 = (new FSharpList(acc, undefined)), (xs_4.tail = t_2, t_2))));
594
594
  xs_3 = FSharpList__get_Tail<T>(xs_3);
595
595
  }
596
596
  const xs_6: FSharpList<State> = node;
@@ -615,7 +615,7 @@ export function collect<T, U>(mapping: ((arg0: T) => FSharpList<U>), xs: FSharpL
615
615
  while (!FSharpList__get_IsEmpty<T>(ys)) {
616
616
  let zs: FSharpList<U> = mapping(FSharpList__get_Head<T>(ys));
617
617
  while (!FSharpList__get_IsEmpty<U>(zs)) {
618
- node = ((xs_1 = node, (t = (new FSharpList(FSharpList__get_Head<U>(zs), void 0)), (xs_1.tail = t, t))));
618
+ node = ((xs_1 = node, (t = (new FSharpList(FSharpList__get_Head<U>(zs), undefined)), (xs_1.tail = t, t))));
619
619
  zs = FSharpList__get_Tail<U>(zs);
620
620
  }
621
621
  ys = FSharpList__get_Tail<T>(ys);
@@ -629,7 +629,7 @@ export function collect<T, U>(mapping: ((arg0: T) => FSharpList<U>), xs: FSharpL
629
629
  export function mapIndexed<T, U>(mapping: ((arg0: int32, arg1: T) => U), xs: FSharpList<T>): FSharpList<U> {
630
630
  const root: FSharpList<U> = FSharpList_get_Empty<U>();
631
631
  const node: FSharpList<U> = foldIndexed<FSharpList<U>, T>((i: int32, acc: FSharpList<U>, x: T): FSharpList<U> => {
632
- const t: FSharpList<U> = new FSharpList(mapping(i, x), void 0);
632
+ const t: FSharpList<U> = new FSharpList(mapping(i, x), undefined);
633
633
  acc.tail = t;
634
634
  return t;
635
635
  }, root, xs);
@@ -641,7 +641,7 @@ export function mapIndexed<T, U>(mapping: ((arg0: int32, arg1: T) => U), xs: FSh
641
641
  export function map<T, U>(mapping: ((arg0: T) => U), xs: FSharpList<T>): FSharpList<U> {
642
642
  const root: FSharpList<U> = FSharpList_get_Empty<U>();
643
643
  const node: FSharpList<U> = fold<T, FSharpList<U>>((acc: FSharpList<U>, x: T): FSharpList<U> => {
644
- const t: FSharpList<U> = new FSharpList(mapping(x), void 0);
644
+ const t: FSharpList<U> = new FSharpList(mapping(x), undefined);
645
645
  acc.tail = t;
646
646
  return t;
647
647
  }, root, xs);
@@ -657,7 +657,7 @@ export function indexed<$a>(xs: FSharpList<$a>): FSharpList<[int32, $a]> {
657
657
  export function map2<T1, T2, U>(mapping: ((arg0: T1, arg1: T2) => U), xs: FSharpList<T1>, ys: FSharpList<T2>): FSharpList<U> {
658
658
  const root: FSharpList<U> = FSharpList_get_Empty<U>();
659
659
  const node: FSharpList<U> = fold2<T1, T2, FSharpList<U>>((acc: FSharpList<U>, x: T1, y: T2): FSharpList<U> => {
660
- const t: FSharpList<U> = new FSharpList(mapping(x, y), void 0);
660
+ const t: FSharpList<U> = new FSharpList(mapping(x, y), undefined);
661
661
  acc.tail = t;
662
662
  return t;
663
663
  }, root, xs, ys);
@@ -677,7 +677,7 @@ export function mapIndexed2<T1, T2, U>(mapping: ((arg0: int32, arg1: T1, arg2: T
677
677
  }
678
678
  else {
679
679
  i_mut = (i + 1);
680
- acc_mut = ((t = (new FSharpList(mapping(i, FSharpList__get_Head<T1>(xs_1), FSharpList__get_Head<T2>(ys_1)), void 0)), (acc.tail = t, t)));
680
+ acc_mut = ((t = (new FSharpList(mapping(i, FSharpList__get_Head<T1>(xs_1), FSharpList__get_Head<T2>(ys_1)), undefined)), (acc.tail = t, t)));
681
681
  xs_1_mut = FSharpList__get_Tail<T1>(xs_1);
682
682
  ys_1_mut = FSharpList__get_Tail<T2>(ys_1);
683
683
  continue loop;
@@ -702,7 +702,7 @@ export function map3<T1, T2, T3, U>(mapping: ((arg0: T1, arg1: T2, arg2: T3) =>
702
702
  return acc;
703
703
  }
704
704
  else {
705
- acc_mut = ((t = (new FSharpList(mapping(FSharpList__get_Head<T1>(xs_1), FSharpList__get_Head<T2>(ys_1), FSharpList__get_Head<T3>(zs_1)), void 0)), (acc.tail = t, t)));
705
+ acc_mut = ((t = (new FSharpList(mapping(FSharpList__get_Head<T1>(xs_1), FSharpList__get_Head<T2>(ys_1), FSharpList__get_Head<T3>(zs_1)), undefined)), (acc.tail = t, t)));
706
706
  xs_1_mut = FSharpList__get_Tail<T1>(xs_1);
707
707
  ys_1_mut = FSharpList__get_Tail<T2>(ys_1);
708
708
  zs_1_mut = FSharpList__get_Tail<T3>(zs_1);
@@ -723,7 +723,7 @@ export function mapFold<State, T, Result>(mapping: ((arg0: State, arg1: T) => [R
723
723
  const patternInput_1: [FSharpList<Result>, State] = fold<T, [FSharpList<Result>, State]>((tupledArg: [FSharpList<Result>, State], x: T): [FSharpList<Result>, State] => {
724
724
  let t: FSharpList<Result>;
725
725
  const patternInput: [Result, State] = mapping(tupledArg[1], x);
726
- return [(t = (new FSharpList(patternInput[0], void 0)), (tupledArg[0].tail = t, t)), patternInput[1]] as [FSharpList<Result>, State];
726
+ return [(t = (new FSharpList(patternInput[0], undefined)), (tupledArg[0].tail = t, t)), patternInput[1]] as [FSharpList<Result>, State];
727
727
  }, [root, state] as [FSharpList<Result>, State], xs);
728
728
  const t_2: FSharpList<Result> = FSharpList_get_Empty<Result>();
729
729
  patternInput_1[0].tail = t_2;
@@ -740,7 +740,7 @@ export function tryPick<T, $a>(f: ((arg0: T) => Option<$a>), xs: FSharpList<T>):
740
740
  while (true) {
741
741
  const xs_1: FSharpList<T> = xs_1_mut;
742
742
  if (FSharpList__get_IsEmpty<T>(xs_1)) {
743
- return void 0;
743
+ return undefined;
744
744
  }
745
745
  else {
746
746
  const matchValue: Option<$a> = f(FSharpList__get_Head<T>(xs_1));
@@ -769,7 +769,7 @@ export function pick<$a, $b>(f: ((arg0: $a) => Option<$b>), xs: FSharpList<$a>):
769
769
  }
770
770
 
771
771
  export function tryFind<$a>(f: ((arg0: $a) => boolean), xs: FSharpList<$a>): Option<$a> {
772
- return tryPick<$a, $a>((x: $a): Option<$a> => (f(x) ? some(x) : void 0), xs);
772
+ return tryPick<$a, $a>((x: $a): Option<$a> => (f(x) ? some(x) : undefined), xs);
773
773
  }
774
774
 
775
775
  export function find<$a>(f: ((arg0: $a) => boolean), xs: FSharpList<$a>): $a {
@@ -802,7 +802,7 @@ export function tryFindIndex<T>(f: ((arg0: T) => boolean), xs: FSharpList<T>): O
802
802
  while (true) {
803
803
  const i: int32 = i_mut, xs_1: FSharpList<T> = xs_1_mut;
804
804
  if (FSharpList__get_IsEmpty<T>(xs_1)) {
805
- return void 0;
805
+ return undefined;
806
806
  }
807
807
  else if (f(FSharpList__get_Head<T>(xs_1))) {
808
808
  return i;
@@ -850,7 +850,7 @@ export function tryItem<T>(n: int32, xs: FSharpList<T>): Option<T> {
850
850
  while (true) {
851
851
  const i: int32 = i_mut, xs_1: FSharpList<T> = xs_1_mut;
852
852
  if (FSharpList__get_IsEmpty<T>(xs_1)) {
853
- return void 0;
853
+ return undefined;
854
854
  }
855
855
  else if (i === n) {
856
856
  return some(FSharpList__get_Head<T>(xs_1));
@@ -874,7 +874,7 @@ export function filter<T>(f: ((arg0: T) => boolean), xs: FSharpList<T>): FSharpL
874
874
  const root: FSharpList<T> = FSharpList_get_Empty<T>();
875
875
  const node: FSharpList<T> = fold<T, FSharpList<T>>((acc: FSharpList<T>, x: T): FSharpList<T> => {
876
876
  if (f(x)) {
877
- const t: FSharpList<T> = new FSharpList(x, void 0);
877
+ const t: FSharpList<T> = new FSharpList(x, undefined);
878
878
  acc.tail = t;
879
879
  return t;
880
880
  }
@@ -896,10 +896,10 @@ export function partition<T>(f: ((arg0: T) => boolean), xs: FSharpList<T>): [FSh
896
896
  const lacc: FSharpList<T> = tupledArg[0];
897
897
  const racc: FSharpList<T> = tupledArg[1];
898
898
  if (f(x)) {
899
- return [(t = (new FSharpList(x, void 0)), (lacc.tail = t, t)), racc] as [FSharpList<T>, FSharpList<T>];
899
+ return [(t = (new FSharpList(x, undefined)), (lacc.tail = t, t)), racc] as [FSharpList<T>, FSharpList<T>];
900
900
  }
901
901
  else {
902
- return [lacc, (t_2 = (new FSharpList(x, void 0)), (racc.tail = t_2, t_2))] as [FSharpList<T>, FSharpList<T>];
902
+ return [lacc, (t_2 = (new FSharpList(x, undefined)), (racc.tail = t_2, t_2))] as [FSharpList<T>, FSharpList<T>];
903
903
  }
904
904
  }, [root1, root2] as [FSharpList<T>, FSharpList<T>], xs);
905
905
  const t_4: FSharpList<T> = FSharpList_get_Empty<T>();
@@ -917,7 +917,7 @@ export function choose<T, U>(f: ((arg0: T) => Option<U>), xs: FSharpList<T>): FS
917
917
  return acc;
918
918
  }
919
919
  else {
920
- const t: FSharpList<U> = new FSharpList(value_1(matchValue), void 0);
920
+ const t: FSharpList<U> = new FSharpList(value_1(matchValue), undefined);
921
921
  acc.tail = t;
922
922
  return t;
923
923
  }
@@ -936,7 +936,7 @@ export function initialize<T>(n: int32, f: ((arg0: int32) => T)): FSharpList<T>
936
936
  const root: FSharpList<T> = FSharpList_get_Empty<T>();
937
937
  let node: FSharpList<T> = root;
938
938
  for (let i = 0; i <= (n - 1); i++) {
939
- node = ((xs = node, (t = (new FSharpList(f(i), void 0)), (xs.tail = t, t))));
939
+ node = ((xs = node, (t = (new FSharpList(f(i), undefined)), (xs.tail = t, t))));
940
940
  }
941
941
  const xs_2: FSharpList<T> = node;
942
942
  const t_2: FSharpList<T> = FSharpList_get_Empty<T>();
@@ -1113,7 +1113,7 @@ export function allPairs<T1, T2>(xs: FSharpList<T1>, ys: FSharpList<T2>): FSharp
1113
1113
  iterate<T1>((x: T1): void => {
1114
1114
  iterate<T2>((y: T2): void => {
1115
1115
  let xs_1: FSharpList<[T1, T2]>, t: FSharpList<[T1, T2]>;
1116
- node = ((xs_1 = node, (t = (new FSharpList([x, y] as [T1, T2], void 0)), (xs_1.tail = t, t))));
1116
+ node = ((xs_1 = node, (t = (new FSharpList([x, y] as [T1, T2], undefined)), (xs_1.tail = t, t))));
1117
1117
  }, ys);
1118
1118
  }, xs);
1119
1119
  const xs_3: FSharpList<[T1, T2]> = node;
@@ -1177,7 +1177,7 @@ export function take<T>(count: int32, xs: FSharpList<T>): FSharpList<T> {
1177
1177
  }
1178
1178
  else {
1179
1179
  i_mut = (i - 1);
1180
- acc_mut = ((t = (new FSharpList(FSharpList__get_Head<T>(xs_1), void 0)), (acc.tail = t, t)));
1180
+ acc_mut = ((t = (new FSharpList(FSharpList__get_Head<T>(xs_1), undefined)), (acc.tail = t, t)));
1181
1181
  xs_1_mut = FSharpList__get_Tail<T>(xs_1);
1182
1182
  continue loop;
1183
1183
  }
@@ -1204,7 +1204,7 @@ export function takeWhile<T>(predicate: ((arg0: T) => boolean), xs: FSharpList<T
1204
1204
  return acc;
1205
1205
  }
1206
1206
  else {
1207
- acc_mut = ((t = (new FSharpList(FSharpList__get_Head<T>(xs_1), void 0)), (acc.tail = t, t)));
1207
+ acc_mut = ((t = (new FSharpList(FSharpList__get_Head<T>(xs_1), undefined)), (acc.tail = t, t)));
1208
1208
  xs_1_mut = FSharpList__get_Tail<T>(xs_1);
1209
1209
  continue loop;
1210
1210
  }
@@ -1232,7 +1232,7 @@ export function truncate<T>(count: int32, xs: FSharpList<T>): FSharpList<T> {
1232
1232
  }
1233
1233
  else {
1234
1234
  i_mut = (i - 1);
1235
- acc_mut = ((t = (new FSharpList(FSharpList__get_Head<T>(xs_1), void 0)), (acc.tail = t, t)));
1235
+ acc_mut = ((t = (new FSharpList(FSharpList__get_Head<T>(xs_1), undefined)), (acc.tail = t, t)));
1236
1236
  xs_1_mut = FSharpList__get_Tail<T>(xs_1);
1237
1237
  continue loop;
1238
1238
  }
@@ -1289,7 +1289,7 @@ export function tryExactlyOne<T>(xs: FSharpList<T>): Option<T> {
1289
1289
  return some(FSharpList__get_Head<T>(xs));
1290
1290
  }
1291
1291
  else {
1292
- return void 0;
1292
+ return undefined;
1293
1293
  }
1294
1294
  }
1295
1295
 
package/Map.ts CHANGED
@@ -66,7 +66,7 @@ export function MapTreeNode$2__get_Height<Key, Value>(_: MapTreeNode$2<Key, Valu
66
66
  }
67
67
 
68
68
  export function MapTreeModule_empty<Key, Value>(): Option<MapTreeLeaf$2<Key, Value>> {
69
- return void 0;
69
+ return undefined;
70
70
  }
71
71
 
72
72
  export function MapTreeModule_sizeAux<Key, Value>(acc_mut: int32, m_mut: Option<MapTreeLeaf$2<Key, Value>>): int32 {
@@ -243,11 +243,11 @@ export function MapTreeModule_tryFind<Key, Value>(comparer_mut: IComparer<Key>,
243
243
  continue MapTreeModule_tryFind;
244
244
  }
245
245
  else {
246
- return void 0;
246
+ return undefined;
247
247
  }
248
248
  }
249
249
  else {
250
- return void 0;
250
+ return undefined;
251
251
  }
252
252
  break;
253
253
  }
@@ -436,7 +436,7 @@ export function MapTreeModule_change<Key, Value>(comparer: IComparer<Key>, k: Ke
436
436
  else {
437
437
  const c_1: int32 = comparer.Compare(k, MapTreeLeaf$2__get_Key<Key, Value>(m2)) | 0;
438
438
  if (c_1 < 0) {
439
- const matchValue_2: Option<Value> = u(void 0);
439
+ const matchValue_2: Option<Value> = u(undefined);
440
440
  if (matchValue_2 != null) {
441
441
  return MapTreeNode$2_$ctor_Z39DE9543<Key, Value>(k, value_1(matchValue_2), MapTreeModule_empty<Key, Value>(), m, 2);
442
442
  }
@@ -454,7 +454,7 @@ export function MapTreeModule_change<Key, Value>(comparer: IComparer<Key>, k: Ke
454
454
  }
455
455
  }
456
456
  else {
457
- const matchValue_4: Option<Value> = u(void 0);
457
+ const matchValue_4: Option<Value> = u(undefined);
458
458
  if (matchValue_4 != null) {
459
459
  return MapTreeNode$2_$ctor_Z39DE9543<Key, Value>(k, value_1(matchValue_4), m, MapTreeModule_empty<Key, Value>(), 2);
460
460
  }
@@ -465,7 +465,7 @@ export function MapTreeModule_change<Key, Value>(comparer: IComparer<Key>, k: Ke
465
465
  }
466
466
  }
467
467
  else {
468
- const matchValue: Option<Value> = u(void 0);
468
+ const matchValue: Option<Value> = u(undefined);
469
469
  if (matchValue != null) {
470
470
  return MapTreeLeaf$2_$ctor_5BDDA1<Key, Value>(k, value_1(matchValue));
471
471
  }
@@ -566,7 +566,7 @@ export function MapTreeModule_tryPickOpt<Key, Value, $a>(f_mut: any, m_mut: Opti
566
566
  }
567
567
  }
568
568
  else {
569
- return void 0;
569
+ return undefined;
570
570
  }
571
571
  break;
572
572
  }
@@ -1014,7 +1014,7 @@ export function MapTreeModule_toSeq<$a, $b>(s: Option<MapTreeLeaf$2<$a, $b>>): I
1014
1014
  return [en_1["System.Collections.Generic.IEnumerator`1.get_Current"](), en_1] as [[$a, $b], IEnumerator<[$a, $b]>];
1015
1015
  }
1016
1016
  else {
1017
- return void 0;
1017
+ return undefined;
1018
1018
  }
1019
1019
  }, MapTreeModule_mkIEnumerator<$a, $b>(s));
1020
1020
  }
@@ -1489,7 +1489,7 @@ export function findKey<$a, $b>(predicate: ((arg0: $a, arg1: $b) => boolean), ta
1489
1489
  return some(k);
1490
1490
  }
1491
1491
  else {
1492
- return void 0;
1492
+ return undefined;
1493
1493
  }
1494
1494
  }, table);
1495
1495
  }
@@ -1501,7 +1501,7 @@ export function tryFindKey<$a, $b>(predicate: ((arg0: $a, arg1: $b) => boolean),
1501
1501
  return some(k);
1502
1502
  }
1503
1503
  else {
1504
- return void 0;
1504
+ return undefined;
1505
1505
  }
1506
1506
  }, table);
1507
1507
  }
package/MutableMap.ts CHANGED
@@ -230,7 +230,7 @@ export function Dictionary__TryFind_2B595<Key, Value>(this$: Dictionary<Key, Val
230
230
  case 0:
231
231
  return getItemFromDict(this$.hashMap, matchValue[1])[matchValue[2]];
232
232
  default:
233
- return void 0;
233
+ return undefined;
234
234
  }
235
235
  }
236
236
 
package/MutableSet.ts CHANGED
@@ -157,7 +157,7 @@ function HashSet__TryFind_2B595<T>(this$: HashSet<T>, k: T): Option<T> {
157
157
  case 0:
158
158
  return some(getItemFromDict(this$.hashMap, matchValue[1])[matchValue[2]]);
159
159
  default:
160
- return void 0;
160
+ return undefined;
161
161
  }
162
162
  }
163
163
 
package/Random.ts CHANGED
@@ -60,7 +60,7 @@ export class NonSeeded implements IRandom {
60
60
  }
61
61
 
62
62
  export function NonSeeded_$reflection(): TypeInfo {
63
- return class_type("Random.NonSeeded", void 0, NonSeeded);
63
+ return class_type("Random.NonSeeded", undefined, NonSeeded);
64
64
  }
65
65
 
66
66
  export function NonSeeded_$ctor(): NonSeeded {
@@ -139,7 +139,7 @@ export class Seeded implements IRandom {
139
139
  }
140
140
 
141
141
  export function Seeded_$reflection(): TypeInfo {
142
- return class_type("Random.Seeded", void 0, Seeded);
142
+ return class_type("Random.Seeded", undefined, Seeded);
143
143
  }
144
144
 
145
145
  export function Seeded_$ctor_Z524259A4(seed: int32): Seeded {
package/Range.ts CHANGED
@@ -13,7 +13,7 @@ export function makeRangeStepFunction<T>(step: T, stop: T, zero: T, add: ((arg0:
13
13
  const stepGreaterThanZero: boolean = stepComparedWithZero > 0;
14
14
  return (x: T): Option<[T, T]> => {
15
15
  const comparedWithLast: int32 = compare(x, stop) | 0;
16
- return ((stepGreaterThanZero && (comparedWithLast <= 0)) ? true : (!stepGreaterThanZero && (comparedWithLast >= 0))) ? ([x, add(x, step)] as [T, T]) : void 0;
16
+ return ((stepGreaterThanZero && (comparedWithLast <= 0)) ? true : (!stepGreaterThanZero && (comparedWithLast >= 0))) ? ([x, add(x, step)] as [T, T]) : undefined;
17
17
  };
18
18
  }
19
19
 
@@ -43,14 +43,14 @@ export function rangeUInt64(start: uint64, step: uint64, stop: uint64): Iterable
43
43
  }
44
44
 
45
45
  export function rangeChar(start: string, stop: string): Iterable<string> {
46
- const intStop: int32 = stop.charCodeAt(0) | 0;
46
+ const intStop: int32 = ~~stop.charCodeAt(0) | 0;
47
47
  return delay<string>((): Iterable<string> => unfold<int32, string>((c: int32): Option<[string, int32]> => {
48
48
  if (c <= intStop) {
49
49
  return [String.fromCharCode(c), c + 1] as [string, int32];
50
50
  }
51
51
  else {
52
- return void 0;
52
+ return undefined;
53
53
  }
54
- }, start.charCodeAt(0)));
54
+ }, ~~start.charCodeAt(0)));
55
55
  }
56
56
 
package/Result.ts CHANGED
@@ -181,7 +181,7 @@ export function Result_ToOption<a, b>(result: FSharpResult$2_$union<a, b>): Opti
181
181
  return some(result.fields[0]);
182
182
  }
183
183
  else {
184
- return void 0;
184
+ return undefined;
185
185
  }
186
186
  }
187
187
 
@@ -190,7 +190,7 @@ export function Result_ToValueOption<a, b>(result: FSharpResult$2_$union<a, b>):
190
190
  return some(result.fields[0]);
191
191
  }
192
192
  else {
193
- return void 0;
193
+ return undefined;
194
194
  }
195
195
  }
196
196
 
package/Seq.ts CHANGED
@@ -122,17 +122,16 @@ export function Enumerator_FromFunctions$1_$ctor_58C54629<T>(current: (() => T),
122
122
 
123
123
  export function Enumerator_cast<T>(e: IEnumerator<T>): IEnumerator<T> {
124
124
  return Enumerator_FromFunctions$1_$ctor_58C54629<T>((): T => e["System.Collections.Generic.IEnumerator`1.get_Current"](), (): boolean => e["System.Collections.IEnumerator.MoveNext"](), (): void => {
125
- const e_1 = e as IDisposable;
126
- disposeSafe(e_1);
125
+ disposeSafe(e);
127
126
  });
128
127
  }
129
128
 
130
129
  export function Enumerator_concat<T, U extends Iterable<T>>(sources: Iterable<U>): IEnumerator<T> {
131
- let outerOpt: Option<IEnumerator<U>> = void 0;
132
- let innerOpt: Option<IEnumerator<T>> = void 0;
130
+ let outerOpt: Option<IEnumerator<U>> = undefined;
131
+ let innerOpt: Option<IEnumerator<T>> = undefined;
133
132
  let started = false;
134
133
  let finished = false;
135
- let curr: Option<T> = void 0;
134
+ let curr: Option<T> = undefined;
136
135
  const finish = (): void => {
137
136
  finished = true;
138
137
  if (innerOpt != null) {
@@ -141,7 +140,7 @@ export function Enumerator_concat<T, U extends Iterable<T>>(sources: Iterable<U>
141
140
  disposeSafe(inner);
142
141
  }
143
142
  finally {
144
- innerOpt = void 0;
143
+ innerOpt = undefined;
145
144
  }
146
145
  }
147
146
  if (outerOpt != null) {
@@ -150,7 +149,7 @@ export function Enumerator_concat<T, U extends Iterable<T>>(sources: Iterable<U>
150
149
  disposeSafe(outer);
151
150
  }
152
151
  finally {
153
- outerOpt = void 0;
152
+ outerOpt = undefined;
154
153
  }
155
154
  }
156
155
  };
@@ -176,7 +175,7 @@ export function Enumerator_concat<T, U extends Iterable<T>>(sources: Iterable<U>
176
175
  return false;
177
176
  }
178
177
  else {
179
- let res: Option<boolean> = void 0;
178
+ let res: Option<boolean> = undefined;
180
179
  while (res == null) {
181
180
  const outerOpt_1: Option<IEnumerator<U>> = outerOpt;
182
181
  const innerOpt_1: Option<IEnumerator<T>> = innerOpt;
@@ -192,7 +191,7 @@ export function Enumerator_concat<T, U extends Iterable<T>>(sources: Iterable<U>
192
191
  disposeSafe(inner_1);
193
192
  }
194
193
  finally {
195
- innerOpt = void 0;
194
+ innerOpt = undefined;
196
195
  }
197
196
  }
198
197
  }
@@ -234,7 +233,7 @@ export function Enumerator_enumerateThenFinally<T>(f: (() => void), e: IEnumerat
234
233
 
235
234
  export function Enumerator_generateWhileSome<T, U>(openf: (() => T), compute: ((arg0: T) => Option<U>), closef: ((arg0: T) => void)): IEnumerator<U> {
236
235
  let started = false;
237
- let curr: Option<U> = void 0;
236
+ let curr: Option<U> = undefined;
238
237
  let state: Option<T> = some(openf());
239
238
  const dispose = (): void => {
240
239
  if (state != null) {
@@ -243,7 +242,7 @@ export function Enumerator_generateWhileSome<T, U>(openf: (() => T), compute: ((
243
242
  closef(x_1);
244
243
  }
245
244
  finally {
246
- state = void 0;
245
+ state = undefined;
247
246
  }
248
247
  }
249
248
  };
@@ -252,7 +251,7 @@ export function Enumerator_generateWhileSome<T, U>(openf: (() => T), compute: ((
252
251
  dispose();
253
252
  }
254
253
  finally {
255
- curr = void 0;
254
+ curr = undefined;
256
255
  }
257
256
  };
258
257
  return Enumerator_FromFunctions$1_$ctor_58C54629<U>((): U => {
@@ -295,7 +294,7 @@ export function Enumerator_generateWhileSome<T, U>(openf: (() => T), compute: ((
295
294
  }
296
295
 
297
296
  export function Enumerator_unfold<State, T>(f: ((arg0: State) => Option<[T, State]>), state: State): IEnumerator<T> {
298
- let curr: Option<[T, State]> = void 0;
297
+ let curr: Option<[T, State]> = undefined;
299
298
  let acc: State = state;
300
299
  return Enumerator_FromFunctions$1_$ctor_58C54629<T>((): T => {
301
300
  if (curr != null) {
@@ -417,7 +416,7 @@ export function cast<T>(xs: Iterable<T>): Iterable<T> {
417
416
 
418
417
  export function choose<T, U>(chooser: ((arg0: T) => Option<U>), xs: Iterable<T>): Iterable<U> {
419
418
  return generate<IEnumerator<T>, U>((): IEnumerator<T> => ofSeq<T>(xs), (e: IEnumerator<T>): Option<U> => {
420
- let curr: Option<U> = void 0;
419
+ let curr: Option<U> = undefined;
421
420
  while ((curr == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
422
421
  curr = chooser(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
423
422
  }
@@ -468,7 +467,7 @@ export function contains<T>(value: T, xs: Iterable<T>, comparer: IEqualityCompar
468
467
  }
469
468
 
470
469
  export function enumerateFromFunctions<$a, $b>(create: (() => $a), moveNext: ((arg0: $a) => boolean), current: ((arg0: $a) => $b)): Iterable<$b> {
471
- return generate<$a, $b>(create, (x: $a): Option<$b> => (moveNext(x) ? some(current(x)) : void 0), (x_1: $a): void => {
470
+ return generate<$a, $b>(create, (x: $a): Option<$b> => (moveNext(x) ? some(current(x)) : undefined), (x_1: $a): void => {
472
471
  const matchValue: any = x_1;
473
472
  if (isDisposable(matchValue)) {
474
473
  const id = matchValue as IDisposable;
@@ -511,7 +510,7 @@ export function enumerateUsing<T extends IDisposable, $a extends Iterable<U>, U>
511
510
  }
512
511
 
513
512
  export function enumerateWhile<T>(guard: (() => boolean), xs: Iterable<T>): Iterable<T> {
514
- return concat<Iterable<T>, T>(unfold<int32, Iterable<T>>((i: int32): Option<[Iterable<T>, int32]> => (guard() ? ([xs, i + 1] as [Iterable<T>, int32]) : void 0), 0));
513
+ return concat<Iterable<T>, T>(unfold<int32, Iterable<T>>((i: int32): Option<[Iterable<T>, int32]> => (guard() ? ([xs, i + 1] as [Iterable<T>, int32]) : undefined), 0));
515
514
  }
516
515
 
517
516
  export function filter<T>(f: ((arg0: T) => boolean), xs: Iterable<T>): Iterable<T> {
@@ -520,7 +519,7 @@ export function filter<T>(f: ((arg0: T) => boolean), xs: Iterable<T>): Iterable<
520
519
  return some(x);
521
520
  }
522
521
  else {
523
- return void 0;
522
+ return undefined;
524
523
  }
525
524
  }, xs);
526
525
  }
@@ -585,10 +584,10 @@ export function tryExactlyOne<T>(xs: Iterable<T>): Option<T> {
585
584
  try {
586
585
  if (e["System.Collections.IEnumerator.MoveNext"]()) {
587
586
  const v: T = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
588
- return e["System.Collections.IEnumerator.MoveNext"]() ? void 0 : some(v);
587
+ return e["System.Collections.IEnumerator.MoveNext"]() ? undefined : some(v);
589
588
  }
590
589
  else {
591
- return void 0;
590
+ return undefined;
592
591
  }
593
592
  }
594
593
  finally {
@@ -599,7 +598,7 @@ export function tryExactlyOne<T>(xs: Iterable<T>): Option<T> {
599
598
  export function tryFind<T>(predicate: ((arg0: T) => boolean), xs: Iterable<T>): Option<T> {
600
599
  const e: IEnumerator<T> = ofSeq<T>(xs);
601
600
  try {
602
- let res: Option<T> = void 0;
601
+ let res: Option<T> = undefined;
603
602
  while ((res == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
604
603
  const c: T = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
605
604
  if (predicate(c)) {
@@ -654,7 +653,7 @@ export function tryFindIndex<T>(predicate: ((arg0: T) => boolean), xs: Iterable<
654
653
  }
655
654
  }
656
655
  else {
657
- return void 0;
656
+ return undefined;
658
657
  }
659
658
  break;
660
659
  }
@@ -752,7 +751,7 @@ export function tryHead<T>(xs: Iterable<T>): Option<T> {
752
751
  else {
753
752
  const e: IEnumerator<T> = ofSeq<T>(xs);
754
753
  try {
755
- return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : void 0;
754
+ return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
756
755
  }
757
756
  finally {
758
757
  disposeSafe(e as IDisposable);
@@ -771,7 +770,7 @@ export function head<T>(xs: Iterable<T>): T {
771
770
  }
772
771
 
773
772
  export function initialize<$a>(count: int32, f: ((arg0: int32) => $a)): Iterable<$a> {
774
- return unfold<int32, $a>((i: int32): Option<[$a, int32]> => ((i < count) ? ([f(i), i + 1] as [$a, int32]) : void 0), 0);
773
+ return unfold<int32, $a>((i: int32): Option<[$a, int32]> => ((i < count) ? ([f(i), i + 1] as [$a, int32]) : undefined), 0);
775
774
  }
776
775
 
777
776
  export function initializeInfinite<$a>(f: ((arg0: int32) => $a)): Iterable<$a> {
@@ -812,7 +811,7 @@ export function tryItem<T>(index: int32, xs: Iterable<T>): Option<T> {
812
811
  while (true) {
813
812
  const index_1: int32 = index_1_mut;
814
813
  if (!e["System.Collections.IEnumerator.MoveNext"]()) {
815
- return void 0;
814
+ return undefined;
816
815
  }
817
816
  else if (index_1 === 0) {
818
817
  return some(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
@@ -845,13 +844,13 @@ export function item<T>(index: int32, xs: Iterable<T>): T {
845
844
  export function iterate<$a>(action: ((arg0: $a) => void), xs: Iterable<$a>): void {
846
845
  fold<$a, void>((unitVar: void, x: $a): void => {
847
846
  action(x);
848
- }, void 0, xs);
847
+ }, undefined, xs);
849
848
  }
850
849
 
851
850
  export function iterate2<$a, $b>(action: ((arg0: $a, arg1: $b) => void), xs: Iterable<$a>, ys: Iterable<$b>): void {
852
851
  fold2<$a, $b, void>((unitVar: void, x: $a, y: $b): void => {
853
852
  action(x, y);
854
- }, void 0, xs, ys);
853
+ }, undefined, xs, ys);
855
854
  }
856
855
 
857
856
  export function iterateIndexed<$a>(action: ((arg0: int32, arg1: $a) => void), xs: Iterable<$a>): void {
@@ -885,7 +884,7 @@ export function tryLast<T>(xs: Iterable<T>): Option<T> {
885
884
  break;
886
885
  }
887
886
  };
888
- return e["System.Collections.IEnumerator.MoveNext"]() ? some(loop(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : void 0;
887
+ return e["System.Collections.IEnumerator.MoveNext"]() ? some(loop(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
889
888
  }
890
889
  finally {
891
890
  disposeSafe(e as IDisposable);
@@ -926,13 +925,13 @@ export function length<T>(xs: Iterable<T>): int32 {
926
925
  }
927
926
 
928
927
  export function map<T, U>(mapping: ((arg0: T) => U), xs: Iterable<T>): Iterable<U> {
929
- return generate<IEnumerator<T>, U>((): IEnumerator<T> => ofSeq<T>(xs), (e: IEnumerator<T>): Option<U> => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : void 0), (e_1: IEnumerator<T>): void => {
928
+ return generate<IEnumerator<T>, U>((): IEnumerator<T> => ofSeq<T>(xs), (e: IEnumerator<T>): Option<U> => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined), (e_1: IEnumerator<T>): void => {
930
929
  disposeSafe(e_1);
931
930
  });
932
931
  }
933
932
 
934
933
  export function mapIndexed<T, U>(mapping: ((arg0: int32, arg1: T) => U), xs: Iterable<T>): Iterable<U> {
935
- return generateIndexed<IEnumerator<T>, U>((): IEnumerator<T> => ofSeq<T>(xs), (i: int32, e: IEnumerator<T>): Option<U> => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(i, e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : void 0), (e_1: IEnumerator<T>): void => {
934
+ return generateIndexed<IEnumerator<T>, U>((): IEnumerator<T> => ofSeq<T>(xs), (i: int32, e: IEnumerator<T>): Option<U> => (e["System.Collections.IEnumerator.MoveNext"]() ? some(mapping(i, e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined), (e_1: IEnumerator<T>): void => {
936
935
  disposeSafe(e_1);
937
936
  });
938
937
  }
@@ -945,7 +944,7 @@ export function map2<T1, T2, U>(mapping: ((arg0: T1, arg1: T2) => U), xs: Iterab
945
944
  return generate<[IEnumerator<T1>, IEnumerator<T2>], U>((): [IEnumerator<T1>, IEnumerator<T2>] => ([ofSeq<T1>(xs), ofSeq<T2>(ys)] as [IEnumerator<T1>, IEnumerator<T2>]), (tupledArg: [IEnumerator<T1>, IEnumerator<T2>]): Option<U> => {
946
945
  const e1: IEnumerator<T1> = tupledArg[0];
947
946
  const e2: IEnumerator<T2> = tupledArg[1];
948
- return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : void 0;
947
+ return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
949
948
  }, (tupledArg_1: [IEnumerator<T1>, IEnumerator<T2>]): void => {
950
949
  try {
951
950
  disposeSafe(tupledArg_1[0]);
@@ -960,7 +959,7 @@ export function mapIndexed2<T1, T2, U>(mapping: ((arg0: int32, arg1: T1, arg2: T
960
959
  return generateIndexed<[IEnumerator<T1>, IEnumerator<T2>], U>((): [IEnumerator<T1>, IEnumerator<T2>] => ([ofSeq<T1>(xs), ofSeq<T2>(ys)] as [IEnumerator<T1>, IEnumerator<T2>]), (i: int32, tupledArg: [IEnumerator<T1>, IEnumerator<T2>]): Option<U> => {
961
960
  const e1: IEnumerator<T1> = tupledArg[0];
962
961
  const e2: IEnumerator<T2> = tupledArg[1];
963
- return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(i, e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : void 0;
962
+ return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(i, e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
964
963
  }, (tupledArg_1: [IEnumerator<T1>, IEnumerator<T2>]): void => {
965
964
  try {
966
965
  disposeSafe(tupledArg_1[0]);
@@ -976,7 +975,7 @@ export function map3<T1, T2, T3, U>(mapping: ((arg0: T1, arg1: T2, arg2: T3) =>
976
975
  const e1: IEnumerator<T1> = tupledArg[0];
977
976
  const e2: IEnumerator<T2> = tupledArg[1];
978
977
  const e3: IEnumerator<T3> = tupledArg[2];
979
- return ((e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) && e3["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"](), e3["System.Collections.Generic.IEnumerator`1.get_Current"]())) : void 0;
978
+ return ((e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) && e3["System.Collections.IEnumerator.MoveNext"]()) ? some(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"](), e3["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
980
979
  }, (tupledArg_1: [IEnumerator<T1>, IEnumerator<T2>, IEnumerator<T3>]): void => {
981
980
  try {
982
981
  disposeSafe(tupledArg_1[0]);
@@ -1036,7 +1035,7 @@ export function CachedSeq$1__Clear<T>(_: CachedSeq$1<T>): void {
1036
1035
  export function cache<T>(source: Iterable<T>): Iterable<T> {
1037
1036
  checkNonNull<Iterable<T>>("source", source);
1038
1037
  const prefix: T[] = [];
1039
- let enumeratorR: Option<Option<IEnumerator<T>>> = void 0;
1038
+ let enumeratorR: Option<Option<IEnumerator<T>>> = undefined;
1040
1039
  return CachedSeq$1_$ctor_Z7A8347D4<T>((): void => {
1041
1040
  Operators_Lock<T[], void>(prefix, (): void => {
1042
1041
  clear(prefix);
@@ -1059,7 +1058,7 @@ export function cache<T>(source: Iterable<T>): Iterable<T> {
1059
1058
  break;
1060
1059
  }
1061
1060
  }
1062
- enumeratorR = void 0;
1061
+ enumeratorR = undefined;
1063
1062
  });
1064
1063
  }, unfold<int32, T>((i_1: int32): Option<[T, int32]> => Operators_Lock<T[], Option<[T, int32]>>(prefix, (): Option<[T, int32]> => {
1065
1064
  if (i_1 < prefix.length) {
@@ -1085,7 +1084,7 @@ export function cache<T>(source: Iterable<T>): Iterable<T> {
1085
1084
  }
1086
1085
  else {
1087
1086
  disposeSafe(enumerator);
1088
- enumeratorR = some(void 0);
1087
+ enumeratorR = some(undefined);
1089
1088
  }
1090
1089
  }
1091
1090
  }
@@ -1093,7 +1092,7 @@ export function cache<T>(source: Iterable<T>): Iterable<T> {
1093
1092
  return [prefix[i_1], i_1 + 1] as [T, int32];
1094
1093
  }
1095
1094
  else {
1096
- return void 0;
1095
+ return undefined;
1097
1096
  }
1098
1097
  }
1099
1098
  }), 0));
@@ -1117,7 +1116,7 @@ export function mapFoldBack<T, State, Result>(mapping: ((arg0: T, arg1: State) =
1117
1116
  export function tryPick<T, $a>(chooser: ((arg0: T) => Option<$a>), xs: Iterable<T>): Option<$a> {
1118
1117
  const e: IEnumerator<T> = ofSeq<T>(xs);
1119
1118
  try {
1120
- let res: Option<$a> = void 0;
1119
+ let res: Option<$a> = undefined;
1121
1120
  while ((res == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
1122
1121
  res = chooser(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
1123
1122
  }
@@ -1245,7 +1244,7 @@ export function take<T>(count: int32, xs: Iterable<T>): Iterable<T> {
1245
1244
  }
1246
1245
  }
1247
1246
  else {
1248
- return void 0;
1247
+ return undefined;
1249
1248
  }
1250
1249
  }, (e_1: IEnumerator<T>): void => {
1251
1250
  disposeSafe(e_1);
@@ -1253,13 +1252,13 @@ export function take<T>(count: int32, xs: Iterable<T>): Iterable<T> {
1253
1252
  }
1254
1253
 
1255
1254
  export function takeWhile<T>(predicate: ((arg0: T) => boolean), xs: Iterable<T>): Iterable<T> {
1256
- return generate<IEnumerator<T>, T>((): IEnumerator<T> => ofSeq<T>(xs), (e: IEnumerator<T>): Option<T> => ((e["System.Collections.IEnumerator.MoveNext"]() && predicate(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : void 0), (e_1: IEnumerator<T>): void => {
1255
+ return generate<IEnumerator<T>, T>((): IEnumerator<T> => ofSeq<T>(xs), (e: IEnumerator<T>): Option<T> => ((e["System.Collections.IEnumerator.MoveNext"]() && predicate(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined), (e_1: IEnumerator<T>): void => {
1257
1256
  disposeSafe(e_1);
1258
1257
  });
1259
1258
  }
1260
1259
 
1261
1260
  export function truncate<T>(count: int32, xs: Iterable<T>): Iterable<T> {
1262
- return generateIndexed<IEnumerator<T>, T>((): IEnumerator<T> => ofSeq<T>(xs), (i: int32, e: IEnumerator<T>): Option<T> => (((i < count) && e["System.Collections.IEnumerator.MoveNext"]()) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : void 0), (e_1: IEnumerator<T>): void => {
1261
+ return generateIndexed<IEnumerator<T>, T>((): IEnumerator<T> => ofSeq<T>(xs), (i: int32, e: IEnumerator<T>): Option<T> => (((i < count) && e["System.Collections.IEnumerator.MoveNext"]()) ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined), (e_1: IEnumerator<T>): void => {
1263
1262
  disposeSafe(e_1);
1264
1263
  });
1265
1264
  }
@@ -1397,7 +1396,7 @@ export function insertAt<T>(index: int32, y: T, xs: Iterable<T>): Iterable<T> {
1397
1396
  if (!isDone) {
1398
1397
  throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1399
1398
  }
1400
- return void 0;
1399
+ return undefined;
1401
1400
  }
1402
1401
  }, (e_1: IEnumerator<T>): void => {
1403
1402
  disposeSafe(e_1);
@@ -1422,11 +1421,11 @@ export function insertManyAt<T>(index: int32, ys: Iterable<T>, xs: Iterable<T>):
1422
1421
  }
1423
1422
  else {
1424
1423
  status = 1;
1425
- inserted = void 0;
1424
+ inserted = undefined;
1426
1425
  }
1427
1426
  }
1428
1427
  else {
1429
- inserted = void 0;
1428
+ inserted = undefined;
1430
1429
  }
1431
1430
  if (inserted == null) {
1432
1431
  if (e1["System.Collections.IEnumerator.MoveNext"]()) {
@@ -1436,7 +1435,7 @@ export function insertManyAt<T>(index: int32, ys: Iterable<T>, xs: Iterable<T>):
1436
1435
  if (status < 1) {
1437
1436
  throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1438
1437
  }
1439
- return void 0;
1438
+ return undefined;
1440
1439
  }
1441
1440
  }
1442
1441
  else {
@@ -1459,13 +1458,13 @@ export function removeAt<T>(index: int32, xs: Iterable<T>): Iterable<T> {
1459
1458
  }
1460
1459
  else if ((i === index) && e["System.Collections.IEnumerator.MoveNext"]()) {
1461
1460
  isDone = true;
1462
- return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : void 0;
1461
+ return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
1463
1462
  }
1464
1463
  else {
1465
1464
  if (!isDone) {
1466
1465
  throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1467
1466
  }
1468
- return void 0;
1467
+ return undefined;
1469
1468
  }
1470
1469
  }, (e_1: IEnumerator<T>): void => {
1471
1470
  disposeSafe(e_1);
@@ -1493,7 +1492,7 @@ export function removeManyAt<T>(index: int32, count: int32, xs: Iterable<T>): It
1493
1492
  }
1494
1493
  }
1495
1494
  }
1496
- return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : void 0;
1495
+ return e["System.Collections.IEnumerator.MoveNext"]() ? some(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
1497
1496
  }
1498
1497
  }, (e_1: IEnumerator<T>): void => {
1499
1498
  disposeSafe(e_1);
@@ -1517,7 +1516,7 @@ export function updateAt<T>(index: int32, y: T, xs: Iterable<T>): Iterable<T> {
1517
1516
  if (!isDone) {
1518
1517
  throw new Error((SR_indexOutOfBounds + "\\nParameter name: ") + "index");
1519
1518
  }
1520
- return void 0;
1519
+ return undefined;
1521
1520
  }
1522
1521
  }, (e_1: IEnumerator<T>): void => {
1523
1522
  disposeSafe(e_1);
package/Set.ts CHANGED
@@ -61,7 +61,7 @@ export function SetTreeNode$1__get_Height<T>(_: SetTreeNode$1<T>): int32 {
61
61
  }
62
62
 
63
63
  export function SetTreeModule_empty<T>(): Option<SetTreeLeaf$1<T>> {
64
- return void 0;
64
+ return undefined;
65
65
  }
66
66
 
67
67
  export function SetTreeModule_countAux<T>(t_mut: Option<SetTreeLeaf$1<T>>, acc_mut: int32): int32 {
@@ -747,7 +747,7 @@ export function SetTreeModule_minimumElementOpt<T>(t: Option<SetTreeLeaf$1<T>>):
747
747
  }
748
748
  }
749
749
  else {
750
- return void 0;
750
+ return undefined;
751
751
  }
752
752
  }
753
753
 
@@ -786,7 +786,7 @@ export function SetTreeModule_maximumElementOpt<T>(t: Option<SetTreeLeaf$1<T>>):
786
786
  }
787
787
  }
788
788
  else {
789
- return void 0;
789
+ return undefined;
790
790
  }
791
791
  }
792
792
 
package/System.Text.ts CHANGED
@@ -19,7 +19,7 @@ export class StringBuilder {
19
19
  }
20
20
 
21
21
  export function StringBuilder_$reflection(): TypeInfo {
22
- return class_type("System.Text.StringBuilder", void 0, StringBuilder);
22
+ return class_type("System.Text.StringBuilder", undefined, StringBuilder);
23
23
  }
24
24
 
25
25
  export function StringBuilder_$ctor_Z18115A39(value: string, capacity: int32): StringBuilder {
package/TimeSpan.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // tslint:disable:max-line-length
2
2
  import { FSharpRef } from "./Types.js";
3
3
  import { comparePrimitives, padLeftAndRightWithZeros, padWithZeros } from "./Util.js";
4
- import { toInt64 } from "./BigInt.js";
4
+ import { toInt64, fromFloat64 } from "./BigInt.js";
5
5
 
6
6
  // TimeSpan in runtime just becomes a number representing milliseconds
7
7
  export type TimeSpan = number;
@@ -73,7 +73,7 @@ export function milliseconds(ts: TimeSpan) {
73
73
  }
74
74
 
75
75
  export function ticks(ts: TimeSpan) {
76
- return toInt64(BigInt(ts) * 10000n);
76
+ return toInt64(fromFloat64(ts * 10000));
77
77
  }
78
78
 
79
79
  export function totalDays(ts: TimeSpan) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "type": "module",
5
5
  "name": "@fable-org/fable-library-ts",
6
- "version": "1.4.0",
6
+ "version": "1.4.1",
7
7
  "description": "Core library used by F# projects compiled with fable.io",
8
8
  "author": "Fable Contributors",
9
9
  "license": "MIT",