@@ -10,6 +10,7 @@ import {
10
10
SOME ,
11
11
EVERY ,
12
12
FOREACH ,
13
+ REVERSE ,
13
14
} from "./internal/typedarray" ;
14
15
15
16
import {
@@ -68,6 +69,10 @@ export class Int8Array extends TypedArray<i8> {
68
69
forEach ( callbackfn : ( value : i8 , index : i32 , self : Int8Array ) => void ) : void {
69
70
FOREACH < Int8Array , i8 > ( this , callbackfn ) ;
70
71
}
72
+
73
+ reverse ( ) : this {
74
+ return REVERSE < this, i8 > ( this ) ;
75
+ }
71
76
}
72
77
73
78
export class Uint8Array extends TypedArray < u8 > {
@@ -118,6 +123,10 @@ export class Uint8Array extends TypedArray<u8> {
118
123
forEach ( callbackfn : ( value : u8 , index : i32 , self : Uint8Array ) => void ) : void {
119
124
FOREACH < Uint8Array , u8 > ( this , callbackfn ) ;
120
125
}
126
+
127
+ reverse ( ) : this {
128
+ return REVERSE < this, u8 > ( this ) ;
129
+ }
121
130
}
122
131
123
132
export class Uint8ClampedArray extends Uint8Array {
@@ -178,6 +187,10 @@ export class Uint8ClampedArray extends Uint8Array {
178
187
forEach ( callbackfn : ( value : u8 , index : i32 , self : Uint8ClampedArray ) => void ) : void {
179
188
FOREACH < Uint8ClampedArray , u8 > ( this , callbackfn ) ;
180
189
}
190
+
191
+ reverse ( ) : this {
192
+ return REVERSE < this, u8 > ( this ) ;
193
+ }
181
194
}
182
195
183
196
export class Int16Array extends TypedArray < i16 > {
@@ -228,6 +241,10 @@ export class Int16Array extends TypedArray<i16> {
228
241
forEach ( callbackfn : ( value : i16 , index : i32 , self : Int16Array ) => void ) : void {
229
242
FOREACH < Int16Array , i16 > ( this , callbackfn ) ;
230
243
}
244
+
245
+ reverse ( ) : this {
246
+ return REVERSE < this, i16 > ( this ) ;
247
+ }
231
248
}
232
249
233
250
export class Uint16Array extends TypedArray < u16 > {
@@ -278,6 +295,10 @@ export class Uint16Array extends TypedArray<u16> {
278
295
forEach ( callbackfn : ( value : u16 , index : i32 , self : Uint16Array ) => void ) : void {
279
296
FOREACH < Uint16Array , u16 > ( this , callbackfn ) ;
280
297
}
298
+
299
+ reverse ( ) : this {
300
+ return REVERSE < this, u16 > ( this ) ;
301
+ }
281
302
}
282
303
283
304
export class Int32Array extends TypedArray < i32 > {
@@ -328,6 +349,10 @@ export class Int32Array extends TypedArray<i32> {
328
349
forEach ( callbackfn : ( value : i32 , index : i32 , self : Int32Array ) => void ) : void {
329
350
FOREACH < Int32Array , i32 > ( this , callbackfn ) ;
330
351
}
352
+
353
+ reverse ( ) : this {
354
+ return REVERSE < this, i32 > ( this ) ;
355
+ }
331
356
}
332
357
333
358
export class Uint32Array extends TypedArray < u32 > {
@@ -378,6 +403,10 @@ export class Uint32Array extends TypedArray<u32> {
378
403
forEach ( callbackfn : ( value : u32 , index : i32 , self : Uint32Array ) => void ) : void {
379
404
FOREACH < Uint32Array , u32 > ( this , callbackfn ) ;
380
405
}
406
+
407
+ reverse ( ) : this {
408
+ return REVERSE < this, u32 > ( this ) ;
409
+ }
381
410
}
382
411
383
412
export class Int64Array extends TypedArray < i64 > {
@@ -428,6 +457,10 @@ export class Int64Array extends TypedArray<i64> {
428
457
forEach ( callbackfn : ( value : i64 , index : i32 , self : Int64Array ) => void ) : void {
429
458
FOREACH < Int64Array , i64 > ( this , callbackfn ) ;
430
459
}
460
+
461
+ reverse ( ) : this {
462
+ return REVERSE < this, i64 > ( this ) ;
463
+ }
431
464
}
432
465
433
466
export class Uint64Array extends TypedArray < u64 > {
@@ -478,6 +511,10 @@ export class Uint64Array extends TypedArray<u64> {
478
511
forEach ( callbackfn : ( value : u64 , index : i32 , self : Uint64Array ) => void ) : void {
479
512
FOREACH < Uint64Array , u64 > ( this , callbackfn ) ;
480
513
}
514
+
515
+ reverse ( ) : this {
516
+ return REVERSE < this, u64 > ( this ) ;
517
+ }
481
518
}
482
519
483
520
export class Float32Array extends TypedArray < f32 > {
@@ -528,6 +565,10 @@ export class Float32Array extends TypedArray<f32> {
528
565
forEach ( callbackfn : ( value : f32 , index : i32 , self : Float32Array ) => void ) : void {
529
566
FOREACH < Float32Array , f32 > ( this , callbackfn ) ;
530
567
}
568
+
569
+ reverse ( ) : this {
570
+ return REVERSE < this, f32 > ( this ) ;
571
+ }
531
572
}
532
573
533
574
export class Float64Array extends TypedArray < f64 > {
@@ -578,4 +619,8 @@ export class Float64Array extends TypedArray<f64> {
578
619
forEach ( callbackfn : ( value : f64 , index : i32 , self : Float64Array ) => void ) : void {
579
620
FOREACH < Float64Array , f64 > ( this , callbackfn ) ;
580
621
}
622
+
623
+ reverse ( ) : this {
624
+ return REVERSE < this, f64 > ( this ) ;
625
+ }
581
626
}
0 commit comments