warpo 2.2.4 → 2.2.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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Environment definitions for compiling AssemblyScript to WebAssembly using asc.
3
3
  * @module std/assembly
4
- *//***/
4
+ */ /***/
5
5
 
6
6
  /// <reference no-default-lib="true"/>
7
7
 
@@ -316,7 +316,7 @@ declare enum AtomicWaitResult {
316
316
  /** Loaded value did not match the expected value. */
317
317
  NOT_EQUAL,
318
318
  /** Not woken before the timeout expired. */
319
- TIMED_OUT
319
+ TIMED_OUT,
320
320
  }
321
321
 
322
322
  /** Converts any other numeric value to an 8-bit signed integer. */
@@ -787,7 +787,24 @@ declare namespace f64 {
787
787
  export function trunc(value: f64): f64;
788
788
  }
789
789
  /** Initializes a 128-bit vector from sixteen 8-bit integer values. Arguments must be compile-time constants. */
790
- declare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128;
790
+ declare function v128(
791
+ a: i8,
792
+ b: i8,
793
+ c: i8,
794
+ d: i8,
795
+ e: i8,
796
+ f: i8,
797
+ g: i8,
798
+ h: i8,
799
+ i: i8,
800
+ j: i8,
801
+ k: i8,
802
+ l: i8,
803
+ m: i8,
804
+ n: i8,
805
+ o: i8,
806
+ p: i8
807
+ ): v128;
791
808
  declare namespace v128 {
792
809
  /** Creates a vector with identical lanes. */
793
810
  export function splat<T>(x: T): v128;
@@ -955,7 +972,7 @@ declare namespace v128 {
955
972
  export function extmul_high<T extends i8 | u8 | i16 | u16 | i32 | u32>(a: v128, b: v128): v128;
956
973
  /**
957
974
  * Selects 8-bit lanes from `a` using indices in `s`. Indices in the range [0-15] select the i-th element of `a`.
958
- *
975
+ *
959
976
  * Unlike {@link v128.swizzle}, the result of an out of bounds index is implementation-defined, depending on hardware
960
977
  * capabilities: Either `0` or `a[s[i]%16]`.
961
978
  */
@@ -974,7 +991,7 @@ declare namespace v128 {
974
991
  /**
975
992
  * Truncates each lane of a vector from 64-bit floating point to a 32-bit signed or unsigned integer as indicated by
976
993
  * `T`. Unused higher integer lanes of the result are initialized to zero.
977
- *
994
+ *
978
995
  * Unlike {@link v128.trunc_sat_zero}, the result of lanes out of bounds of the target type is implementation defined,
979
996
  * depending on hardware capabilities:
980
997
  * - If the input lane contains `NaN`, the result is either `0` or the respective maximum integer value.
@@ -985,7 +1002,7 @@ declare namespace v128 {
985
1002
  /**
986
1003
  * Performs the fused multiply-add operation (`a * b + c`) on 32- or 64-bit floating point lanes as indicated by
987
1004
  * `T`.
988
- *
1005
+ *
989
1006
  * The result is implementation defined, depending on hardware capabilities:
990
1007
  * - Either `a * b` is rounded once and the final result rounded again, or
991
1008
  * - The expression is evaluated with higher precision and only rounded once
@@ -994,7 +1011,7 @@ declare namespace v128 {
994
1011
  /**
995
1012
  * Performs the fused negative multiply-add operation (`-(a * b) + c`) on 32- or 64-bit floating point lanes as
996
1013
  * indicated by `T`.
997
- *
1014
+ *
998
1015
  * The result is implementation defined, depending on hardware capabilities:
999
1016
  * - Either `a * b` is rounded once and the final result rounded again, or
1000
1017
  * - The expression is evaluated with higher precision and only rounded once
@@ -1002,7 +1019,7 @@ declare namespace v128 {
1002
1019
  export function relaxed_nmadd<T>(a: v128, b: v128, c: v128): v128;
1003
1020
  /**
1004
1021
  * Selects 8-, 16-, 32- or 64-bit integer lanes as indicated by `T` from `a` or `b` based on masks in `m`.
1005
- *
1022
+ *
1006
1023
  * Behaves like {@link v128.bitselect} if masks in `m` do have all bits either set (result is `a[i]`) or unset (result
1007
1024
  * is `b[i]`). Otherwise the result is implementation-defined, depending on hardware capabilities: If the most
1008
1025
  * significant bit of `m` is set, the result is either `bitselect(a[i], b[i], mask)` or `a[i]`, otherwise the result
@@ -1011,28 +1028,28 @@ declare namespace v128 {
1011
1028
  export function relaxed_laneselect<T>(a: v128, b: v128, m: v128): v128;
1012
1029
  /**
1013
1030
  * Computes the minimum of each 32- or 64-bit floating point lane as indicated by `T`.
1014
- *
1031
+ *
1015
1032
  * Unlike {@link v128.min}, the result is implementation-defined if either value is `NaN` or both are `-0.0` and
1016
1033
  * `+0.0`, depending on hardware capabilities: Either `a[i]` or `b[i]`.
1017
1034
  */
1018
1035
  export function relaxed_min<T>(a: v128, b: v128): v128;
1019
1036
  /**
1020
1037
  * Computes the maximum of each 32- or 64-bit floating point lane as indicated by `T`.
1021
- *
1038
+ *
1022
1039
  * Unlike {@link v128.max}, the result is implementation-defined if either value is `NaN` or both are `-0.0` and
1023
1040
  * `+0.0`, depending on hardware capabilities: Either `a[i]` or `b[i]`.
1024
1041
  */
1025
1042
  export function relaxed_max<T>(a: v128, b: v128): v128;
1026
1043
  /**
1027
1044
  * Performs the lane-wise rounding multiplication in Q15 format (`(a[i] * b[i] + (1 << (Q - 1))) >> Q` where `Q=15`).
1028
- *
1045
+ *
1029
1046
  * Unlike {@link v128.q15mulr_sat}, the result is implementation-defined if both inputs are the minimum signed value:
1030
1047
  * Either the minimum or maximum signed value.
1031
1048
  */
1032
1049
  export function relaxed_q15mulr<T>(a: v128, b: v128): v128;
1033
1050
  /**
1034
1051
  * Computes the dot product of two 8-bit integer lanes each, yielding lanes one size wider than the input.
1035
- *
1052
+ *
1036
1053
  * Unlike {@link v128.dot}, if the most significant bit of `b[i]` is set, whether `b[i]` is interpreted as signed or
1037
1054
  * unsigned is implementation-defined.
1038
1055
  */
@@ -1040,14 +1057,31 @@ declare namespace v128 {
1040
1057
  /**
1041
1058
  * Computes the dot product of two 8-bit integer lanes each, yielding lanes two sizes wider than the input with the
1042
1059
  * lanes of `c` accumulated into the result.
1043
- *
1060
+ *
1044
1061
  * Unlike {@link v128.dot}, if the most significant bit of `b[i]` is set, whether `b[i]` is interpreted as signed or
1045
1062
  * unsigned by the intermediate multiplication is implementation-defined.
1046
1063
  */
1047
1064
  export function relaxed_dot_add<T>(a: v128, b: v128, c: v128): v128;
1048
1065
  }
1049
1066
  /** Initializes a 128-bit vector from sixteen 8-bit integer values. Arguments must be compile-time constants. */
1050
- declare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128;
1067
+ declare function i8x16(
1068
+ a: i8,
1069
+ b: i8,
1070
+ c: i8,
1071
+ d: i8,
1072
+ e: i8,
1073
+ f: i8,
1074
+ g: i8,
1075
+ h: i8,
1076
+ i: i8,
1077
+ j: i8,
1078
+ k: i8,
1079
+ l: i8,
1080
+ m: i8,
1081
+ n: i8,
1082
+ o: i8,
1083
+ p: i8
1084
+ ): v128;
1051
1085
  declare namespace i8x16 {
1052
1086
  /** Creates a vector with sixteen identical 8-bit integer lanes. */
1053
1087
  export function splat(x: i8): v128;
@@ -1120,20 +1154,39 @@ declare namespace i8x16 {
1120
1154
  /** Narrows each 16-bit signed integer lane to 8-bit unsigned integer lanes. */
1121
1155
  export function narrow_i16x8_u(a: v128, b: v128): v128;
1122
1156
  /** Selects 8-bit lanes from either vector according to the specified [0-15] respectively [16-31] lane indexes. */
1123
- export function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8): v128;
1157
+ export function shuffle(
1158
+ a: v128,
1159
+ b: v128,
1160
+ l0: u8,
1161
+ l1: u8,
1162
+ l2: u8,
1163
+ l3: u8,
1164
+ l4: u8,
1165
+ l5: u8,
1166
+ l6: u8,
1167
+ l7: u8,
1168
+ l8: u8,
1169
+ l9: u8,
1170
+ l10: u8,
1171
+ l11: u8,
1172
+ l12: u8,
1173
+ l13: u8,
1174
+ l14: u8,
1175
+ l15: u8
1176
+ ): v128;
1124
1177
  /** Selects 8-bit lanes from the first vector according to the indexes [0-15] specified by the 8-bit lanes of the second vector. */
1125
1178
  export function swizzle(a: v128, s: v128): v128;
1126
1179
  /**
1127
1180
  * Selects 8-bit integer lanes from `a` using indices in `s`. Indices in the range [0-15] select the i-th element of
1128
1181
  * `a`.
1129
- *
1182
+ *
1130
1183
  * Unlike {@link i8x16.swizzle}, the result of an out of bounds index is implementation-defined, depending on hardware
1131
1184
  * capabilities: Either `0` or `a[s[i]%16]`.
1132
1185
  */
1133
1186
  export function relaxed_swizzle(a: v128, s: v128): v128;
1134
1187
  /**
1135
1188
  * Selects 8-bit integer lanes from `a` or `b` based on masks in `m`.
1136
- *
1189
+ *
1137
1190
  * Behaves like {@link v128.bitselect} if masks in `m` do have all bits either set (result is `a[i]`) or unset (result
1138
1191
  * is `b[i]`). Otherwise the result is implementation-defined, depending on hardware capabilities: If the most
1139
1192
  * significant bit of `m` is set, the result is either `bitselect(a[i], b[i], mask)` or `a[i]`, otherwise the result
@@ -1256,7 +1309,7 @@ declare namespace i16x8 {
1256
1309
  export function relaxed_q15mulr_s(a: v128, b: v128): v128;
1257
1310
  /**
1258
1311
  * Computes the dot product of two 8-bit integer lanes each, yielding lanes one size wider than the input.
1259
- *
1312
+ *
1260
1313
  * Some results are implementation-defined: If the most significant bit of `b[i]` is set, the intermediate
1261
1314
  * multiplication may interpret `b[i]` as either signed or unsigned.
1262
1315
  */
@@ -1374,7 +1427,7 @@ declare namespace i32x4 {
1374
1427
  /**
1375
1428
  * Truncates each lane of a vector from 64-bit floating point to a signed 32-bit integer. The two higher
1376
1429
  * integer lanes of the result are initialized to zero.
1377
- *
1430
+ *
1378
1431
  * Unlike {@link i32x4.trunc_sat_f64x2_s_zero}, the result of lanes out of bounds of the target type is implementation
1379
1432
  * defined, depending on hardware capabilities:
1380
1433
  * - If the input lane contains `NaN`, the result is either `0` or the respective maximum integer value.
@@ -1385,7 +1438,7 @@ declare namespace i32x4 {
1385
1438
  /**
1386
1439
  * Truncates each lane of a vector from 64-bit floating point to an unsigned 32-bit integer. The two higher
1387
1440
  * integer lanes of the result are initialized to zero.
1388
- *
1441
+ *
1389
1442
  * Unlike {@link i32x4.trunc_sat_f64x2_u_zero}, the result of lanes out of bounds of the target type is implementation
1390
1443
  * defined, depending on hardware capabilities:
1391
1444
  * - If the input lane contains `NaN`, the result is either `0` or the respective maximum integer value.
@@ -1405,7 +1458,7 @@ declare namespace i32x4 {
1405
1458
  /**
1406
1459
  * Computes the dot product of two 8-bit lanes each, yielding lanes two sizes wider than the input with the lanes of
1407
1460
  * `c` accumulated into the result.
1408
- *
1461
+ *
1409
1462
  * Unlike {@link v128.dot}, if the most significant bit of `b[i]` is set, whether `b[i]` is interpreted as signed or
1410
1463
  * unsigned by the intermediate multiplication is implementation-defined.
1411
1464
  */
@@ -1541,7 +1594,7 @@ declare namespace f32x4 {
1541
1594
  export function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8): v128;
1542
1595
  /**
1543
1596
  * Performs the fused multiply-add operation (`a * b + c`) on all 32-bit floating point lanes.
1544
- *
1597
+ *
1545
1598
  * The result is implementation defined, depending on hardware capabilities:
1546
1599
  * - Either `a * b` is rounded once and the final result rounded again, or
1547
1600
  * - The expression is evaluated with higher precision and only rounded once
@@ -1549,7 +1602,7 @@ declare namespace f32x4 {
1549
1602
  export function relaxed_madd(a: v128, b: v128, c: v128): v128;
1550
1603
  /**
1551
1604
  * Performs the fused negative multiply-add operation (`-(a * b) + c`) on all 32-bit floating point lanes.
1552
- *
1605
+ *
1553
1606
  * The result is implementation defined, depending on hardware capabilities:
1554
1607
  * - Either `a * b` is rounded once and the final result rounded again, or
1555
1608
  * - The expression is evaluated with higher precision and only rounded once
@@ -1557,14 +1610,14 @@ declare namespace f32x4 {
1557
1610
  export function relaxed_nmadd(a: v128, b: v128, c: v128): v128;
1558
1611
  /**
1559
1612
  * Computes the minimum of each 32-bit floating point lane.
1560
- *
1613
+ *
1561
1614
  * Unlike {@link f32x4.min}, the result is implementation-defined if either value is `NaN`, `-0.0` or `+0.0`,
1562
1615
  * depending on hardware capabilities: Either `a[i]` or `b[i]`.
1563
1616
  */
1564
1617
  export function relaxed_min(a: v128, b: v128): v128;
1565
1618
  /**
1566
1619
  * Computes the maximum of each 32-bit floating point lane.
1567
- *
1620
+ *
1568
1621
  * Unlike {@link f32x4.max}, the result is implementation-defined if either value is `NaN`, `-0.0` or `+0.0`,
1569
1622
  * depending on hardware capabilities: Either `a[i]` or `b[i]`.
1570
1623
  */
@@ -1631,7 +1684,7 @@ declare namespace f64x2 {
1631
1684
  export function shuffle(a: v128, b: v128, l0: u8, l1: u8): v128;
1632
1685
  /**
1633
1686
  * Performs the fused multiply-add operation (`a * b + c`) on all 64-bit floating point lanes.
1634
- *
1687
+ *
1635
1688
  * The result is implementation defined, depending on hardware capabilities:
1636
1689
  * - Either `a * b` is rounded once and the final result rounded again, or
1637
1690
  * - The expression is evaluated with higher precision and only rounded once
@@ -1639,7 +1692,7 @@ declare namespace f64x2 {
1639
1692
  export function relaxed_madd(a: v128, b: v128, c: v128): v128;
1640
1693
  /**
1641
1694
  * Performs the fused negative multiply-add operation (`-(a * b) + c`) on all 64-bit floating point lanes.
1642
- *
1695
+ *
1643
1696
  * The result is implementation defined, depending on hardware capabilities:
1644
1697
  * - Either `a * b` is rounded once and the final result rounded again, or
1645
1698
  * - The expression is evaluated with higher precision and only rounded once
@@ -1647,14 +1700,14 @@ declare namespace f64x2 {
1647
1700
  export function relaxed_nmadd(a: v128, b: v128, c: v128): v128;
1648
1701
  /**
1649
1702
  * Computes the minimum of each 64-bit floating point lane.
1650
- *
1703
+ *
1651
1704
  * Unlike {@link f64x2.min}, the result is implementation-defined if either value is `NaN`, `-0.0` or `+0.0`,
1652
1705
  * depending on hardware capabilities: Either `a[i]` or `b[i]`.
1653
1706
  */
1654
1707
  export function relaxed_min(a: v128, b: v128): v128;
1655
1708
  /**
1656
1709
  * Computes the maximum of each 64-bit floating point lane.
1657
- *
1710
+ *
1658
1711
  * Unlike {@link f64x2.max}, the result is implementation-defined if either value is `NaN`, `-0.0` or `+0.0`,
1659
1712
  * depending on hardware capabilities: Either `a[i]` or `b[i]`.
1660
1713
  */
@@ -1829,16 +1882,57 @@ declare namespace table {
1829
1882
 
1830
1883
  declare namespace Atomics {
1831
1884
  export function load<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32): T;
1832
- export function store<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, value: T): void;
1833
- export function add<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, value: T): T;
1834
- export function sub<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, value: T): T;
1835
- export function and<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, value: T): T;
1836
- export function or<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, value: T): T;
1837
- export function xor<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, value: T): T;
1838
- export function exchange<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, value: T): T;
1839
- export function compareExchange<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, expectedValue: T, replacementValue: T): T;
1840
- export function wait<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, value: T, timeout?: i64): AtomicWaitResult;
1841
- export function notify<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(array: TypedArray<T>, index: i32, count?: i32): i32;
1885
+ export function store<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1886
+ array: TypedArray<T>,
1887
+ index: i32,
1888
+ value: T
1889
+ ): void;
1890
+ export function add<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1891
+ array: TypedArray<T>,
1892
+ index: i32,
1893
+ value: T
1894
+ ): T;
1895
+ export function sub<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1896
+ array: TypedArray<T>,
1897
+ index: i32,
1898
+ value: T
1899
+ ): T;
1900
+ export function and<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1901
+ array: TypedArray<T>,
1902
+ index: i32,
1903
+ value: T
1904
+ ): T;
1905
+ export function or<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1906
+ array: TypedArray<T>,
1907
+ index: i32,
1908
+ value: T
1909
+ ): T;
1910
+ export function xor<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1911
+ array: TypedArray<T>,
1912
+ index: i32,
1913
+ value: T
1914
+ ): T;
1915
+ export function exchange<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1916
+ array: TypedArray<T>,
1917
+ index: i32,
1918
+ value: T
1919
+ ): T;
1920
+ export function compareExchange<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1921
+ array: TypedArray<T>,
1922
+ index: i32,
1923
+ expectedValue: T,
1924
+ replacementValue: T
1925
+ ): T;
1926
+ export function wait<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1927
+ array: TypedArray<T>,
1928
+ value: T,
1929
+ timeout?: i64
1930
+ ): AtomicWaitResult;
1931
+ export function notify<T extends i8 | u8 | i16 | u16 | i32 | u32 | i64 | u64>(
1932
+ array: TypedArray<T>,
1933
+ index: i32,
1934
+ count?: i32
1935
+ ): i32;
1842
1936
  /** The static Atomics.isLockFree() method is used to determine whether to use locks or atomic operations. It returns true, if the given size is one of the BYTES_PER_ELEMENT */
1843
1937
  export function isLockFree(size: usize): bool;
1844
1938
  }
@@ -1988,7 +2082,7 @@ declare abstract class TypedArray<T> implements ArrayBufferView {
1988
2082
  /** The join() method joins all elements of an array into a string. This method has the same algorithm as Array.prototype.join(). */
1989
2083
  join(separator?: string): string;
1990
2084
  /** The set() method stores multiple values in the typed array, reading input values from a specified array. */
1991
- set<U extends ArrayLike<number>>(source: U, offset?: i32): void
2085
+ set<U extends ArrayLike<number>>(source: U, offset?: i32): void;
1992
2086
  /** The toString() method returns a string representing the specified array and its elements. This method has the same algorithm as Array.prototype.toString() */
1993
2087
  toString(): string;
1994
2088
  }
@@ -2051,7 +2145,6 @@ declare class Float64Array extends TypedArray<f64> {
2051
2145
 
2052
2146
  /** Class representing a sequence of values of type `T`. */
2053
2147
  declare class Array<T> {
2054
-
2055
2148
  /** Tests if a value is an array. */
2056
2149
  static isArray<U>(value: any): value is Array<any>;
2057
2150
 
@@ -2076,8 +2169,14 @@ declare class Array<T> {
2076
2169
  forEach(callbackfn: (value: T, index: i32, array: Array<T>) => void): void;
2077
2170
  map<U>(callbackfn: (value: T, index: i32, array: Array<T>) => U): Array<U>;
2078
2171
  filter(callbackfn: (value: T, index: i32, array: Array<T>) => bool): Array<T>;
2079
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array<T>) => U, initialValue: U): U;
2080
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array<T>) => U, initialValue: U): U;
2172
+ reduce<U>(
2173
+ callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array<T>) => U,
2174
+ initialValue: U
2175
+ ): U;
2176
+ reduceRight<U>(
2177
+ callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: Array<T>) => U,
2178
+ initialValue: U
2179
+ ): U;
2081
2180
  every(callbackfn: (value: T, index: i32, array: Array<T>) => bool): bool;
2082
2181
  some(callbackfn: (value: T, index: i32, array: Array<T>) => bool): bool;
2083
2182
  shift(): T;
@@ -2113,8 +2212,14 @@ declare class StaticArray<T> {
2113
2212
  forEach(callbackfn: (value: T, index: i32, array: StaticArray<T>) => void): void;
2114
2213
  map<U>(callbackfn: (value: T, index: i32, array: StaticArray<T>) => U): Array<U>;
2115
2214
  filter(callbackfn: (value: T, index: i32, array: StaticArray<T>) => bool): Array<T>;
2116
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray<T>) => U, initialValue: U): U;
2117
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray<T>) => U, initialValue: U): U;
2215
+ reduce<U>(
2216
+ callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray<T>) => U,
2217
+ initialValue: U
2218
+ ): U;
2219
+ reduceRight<U>(
2220
+ callbackfn: (previousValue: U, currentValue: T, currentIndex: i32, array: StaticArray<T>) => U,
2221
+ initialValue: U
2222
+ ): U;
2118
2223
  every(callbackfn: (value: T, index: i32, array: StaticArray<T>) => bool): bool;
2119
2224
  some(callbackfn: (value: T, index: i32, array: StaticArray<T>) => bool): bool;
2120
2225
  concat(items: Array<T>): Array<T>;
@@ -2176,7 +2281,7 @@ declare namespace String {
2176
2281
  /** Replaces unpaired surrogates with the replacement character (U+FFFD). */
2177
2282
  REPLACE,
2178
2283
  /** Throws an error on unpaired surrogates. */
2179
- ERROR
2284
+ ERROR,
2180
2285
  }
2181
2286
  /** Calculates the byte length of the specified string when encoded as UTF-8, optionally null terminated. */
2182
2287
  export function byteLength(str: string, nullTerminated?: bool): i32;
@@ -2220,15 +2325,7 @@ declare namespace performance {
2220
2325
 
2221
2326
  declare class Date {
2222
2327
  /** Returns the UTC timestamp in milliseconds of the specified date. */
2223
- static UTC(
2224
- year: i32,
2225
- month: i32,
2226
- day: i32,
2227
- hour: i32,
2228
- minute: i32,
2229
- second: i32,
2230
- millisecond: i32
2231
- ): i64;
2328
+ static UTC(year: i32, month: i32, day: i32, hour: i32, minute: i32, second: i32, millisecond: i32): i64;
2232
2329
  /** Returns the current UTC timestamp in milliseconds. */
2233
2330
  static now(): i64;
2234
2331
  /** Parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC. */
@@ -2267,7 +2364,6 @@ declare class Date {
2267
2364
 
2268
2365
  /** Class for representing a runtime error. Base class of all errors. */
2269
2366
  declare class Error {
2270
-
2271
2367
  /** Error name. */
2272
2368
  name: string;
2273
2369
 
@@ -2285,16 +2381,16 @@ declare class Error {
2285
2381
  }
2286
2382
 
2287
2383
  /** Class for indicating an error when a value is not in the set or range of allowed values. */
2288
- declare class RangeError extends Error { }
2384
+ declare class RangeError extends Error {}
2289
2385
 
2290
2386
  /** Class for indicating an error when a value is not of the expected type. */
2291
- declare class TypeError extends Error { }
2387
+ declare class TypeError extends Error {}
2292
2388
 
2293
2389
  /** Class for indicating an error when trying to interpret syntactically invalid code. */
2294
- declare class SyntaxError extends Error { }
2390
+ declare class SyntaxError extends Error {}
2295
2391
 
2296
2392
  /** Class for indicating an error when a global URI handling function was used in a wrong way. */
2297
- declare class URIError extends Error { }
2393
+ declare class URIError extends Error {}
2298
2394
 
2299
2395
  interface Function {
2300
2396
  /** Function table index. */
@@ -2317,7 +2413,8 @@ type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any ? U
2317
2413
  /**
2318
2414
  * Removes the 'this' parameter from a function type.
2319
2415
  */
2320
- type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
2416
+ type OmitThisParameter<T> =
2417
+ unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
2321
2418
 
2322
2419
  interface CallableFunction extends Function {
2323
2420
  /**
@@ -2353,7 +2450,11 @@ interface CallableFunction extends Function {
2353
2450
  * @param thisArg The object to be used as the this object.
2354
2451
  * @param args Arguments to bind to the parameters of the function.
2355
2452
  */
2356
- bind<T, A extends any[], B extends any[], R>(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R;
2453
+ bind<T, A extends any[], B extends any[], R>(
2454
+ this: (this: T, ...args: [...A, ...B]) => R,
2455
+ thisArg: T,
2456
+ ...args: A
2457
+ ): (...args: B) => R;
2357
2458
  }
2358
2459
 
2359
2460
  interface NewableFunction extends Function {
@@ -2389,13 +2490,17 @@ interface NewableFunction extends Function {
2389
2490
  * @param thisArg The object to be used as the this object.
2390
2491
  * @param args Arguments to bind to the parameters of the function.
2391
2492
  */
2392
- bind<A extends any[], B extends any[], R>(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R;
2493
+ bind<A extends any[], B extends any[], R>(
2494
+ this: new (...args: [...A, ...B]) => R,
2495
+ thisArg: any,
2496
+ ...args: A
2497
+ ): new (...args: B) => R;
2393
2498
  }
2394
2499
 
2395
2500
  interface IArguments {}
2396
2501
  interface RegExp {}
2397
2502
 
2398
- declare class Map<K,V> {
2503
+ declare class Map<K, V> {
2399
2504
  readonly size: i32;
2400
2505
  has(key: K): bool;
2401
2506
  set(key: K, value: V): this;
@@ -2576,7 +2681,7 @@ declare namespace process {
2576
2681
  /** Array of command line arguments passed to the binary upon instantiation. */
2577
2682
  export const argv: string[];
2578
2683
  /** Map of variables in the binary's user environment. */
2579
- export const env: Map<string,string>;
2684
+ export const env: Map<string, string>;
2580
2685
  /** Terminates the process with either the given exit code, or `process.exitCode` if omitted. */
2581
2686
  export function exit(code?: i32): void;
2582
2687
  /** `exit()`’s default value. Defaults to `0`. */
@@ -2645,38 +2750,78 @@ interface TypedPropertyDescriptor<T> {
2645
2750
  set?(value: T): void;
2646
2751
  }
2647
2752
 
2648
- type Constructor =
2649
- (new (...args: any[]) => unknown)
2650
- | (abstract new (...args: any[]) => unknown);
2753
+ type Constructor = (new (...args: any[]) => unknown) | (abstract new (...args: any[]) => unknown);
2651
2754
 
2652
2755
  /** Annotates a method as a binary operator overload for the specified `token`. */
2653
- declare function operator(token:
2654
- "[]" | "[]=" | "{}" | "{}=" | "==" | "!=" | ">" | "<" | "<=" | ">=" |
2655
- ">>" | ">>>" | "<<" | "&" | "|" | "^" | "+" | "-" | "*" | "**" | "/" | "%"
2656
- ): (
2657
- target: any,
2658
- propertyKey: string,
2659
- descriptor: TypedPropertyDescriptor<any>
2660
- ) => TypedPropertyDescriptor<any> | void;
2756
+ declare function operator(
2757
+ token:
2758
+ | "[]"
2759
+ | "[]="
2760
+ | "{}"
2761
+ | "{}="
2762
+ | "=="
2763
+ | "!="
2764
+ | ">"
2765
+ | "<"
2766
+ | "<="
2767
+ | ">="
2768
+ | ">>"
2769
+ | ">>>"
2770
+ | "<<"
2771
+ | "&"
2772
+ | "|"
2773
+ | "^"
2774
+ | "+"
2775
+ | "-"
2776
+ | "*"
2777
+ | "**"
2778
+ | "/"
2779
+ | "%"
2780
+ ): (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<any>) => TypedPropertyDescriptor<any> | void;
2661
2781
 
2662
2782
  declare namespace operator {
2663
2783
  /** Annotates a method as a binary operator overload for the specified `token`. */
2664
- export function binary(token:
2665
- "[]" | "[]=" | "{}" | "{}=" | "==" | "!=" | ">" | "<" | "<=" | ">=" |
2666
- ">>" | ">>>" | "<<" | "&" | "|" | "^" | "+" | "-" | "*" | "**" | "/" | "%"
2784
+ export function binary(
2785
+ token:
2786
+ | "[]"
2787
+ | "[]="
2788
+ | "{}"
2789
+ | "{}="
2790
+ | "=="
2791
+ | "!="
2792
+ | ">"
2793
+ | "<"
2794
+ | "<="
2795
+ | ">="
2796
+ | ">>"
2797
+ | ">>>"
2798
+ | "<<"
2799
+ | "&"
2800
+ | "|"
2801
+ | "^"
2802
+ | "+"
2803
+ | "-"
2804
+ | "*"
2805
+ | "**"
2806
+ | "/"
2807
+ | "%"
2667
2808
  ): (
2668
2809
  target: any,
2669
2810
  propertyKey: string,
2670
2811
  descriptor: TypedPropertyDescriptor<any>
2671
2812
  ) => TypedPropertyDescriptor<any> | void;
2672
2813
  /** Annotates a method as an unary prefix operator overload for the specified `token`. */
2673
- export function prefix(token: "!" | "~" | "+" | "-" | "++" | "--"): (
2814
+ export function prefix(
2815
+ token: "!" | "~" | "+" | "-" | "++" | "--"
2816
+ ): (
2674
2817
  target: any,
2675
2818
  propertyKey: string,
2676
2819
  descriptor: TypedPropertyDescriptor<any>
2677
2820
  ) => TypedPropertyDescriptor<any> | void;
2678
2821
  /** Annotates a method as an unary postfix operator overload for the specified `token`. */
2679
- export function postfix(token: "++" | "--"): (
2822
+ export function postfix(
2823
+ token: "++" | "--"
2824
+ ): (
2680
2825
  target: any,
2681
2826
  propertyKey: string,
2682
2827
  descriptor: TypedPropertyDescriptor<any>
package/dist/warpo.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warpo",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "next generation AssemblyScript compiler with optimizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -35,6 +35,9 @@
35
35
  "compiler"
36
36
  ],
37
37
  "author": "congcong.cai@bmw.com",
38
+ "repository": {
39
+ "url": "https://github.com/wasm-ecosystem/warpo"
40
+ },
38
41
  "files": [
39
42
  "create",
40
43
  "dist",