@@ -10,6 +10,7 @@ import {
1010 SOME ,
1111 EVERY ,
1212 FOREACH ,
13+ REVERSE ,
1314} from "./internal/typedarray" ;
1415
1516import {
@@ -68,6 +69,10 @@ export class Int8Array extends TypedArray<i8> {
6869 forEach ( callbackfn : ( value : i8 , index : i32 , self : Int8Array ) => void ) : void {
6970 FOREACH < Int8Array , i8 > ( this , callbackfn ) ;
7071 }
72+
73+ reverse ( ) : this {
74+ return REVERSE < this, i8 > ( this ) ;
75+ }
7176}
7277
7378export class Uint8Array extends TypedArray < u8 > {
@@ -118,6 +123,10 @@ export class Uint8Array extends TypedArray<u8> {
118123 forEach ( callbackfn : ( value : u8 , index : i32 , self : Uint8Array ) => void ) : void {
119124 FOREACH < Uint8Array , u8 > ( this , callbackfn ) ;
120125 }
126+
127+ reverse ( ) : this {
128+ return REVERSE < this, u8 > ( this ) ;
129+ }
121130}
122131
123132export class Uint8ClampedArray extends Uint8Array {
@@ -178,6 +187,10 @@ export class Uint8ClampedArray extends Uint8Array {
178187 forEach ( callbackfn : ( value : u8 , index : i32 , self : Uint8ClampedArray ) => void ) : void {
179188 FOREACH < Uint8ClampedArray , u8 > ( this , callbackfn ) ;
180189 }
190+
191+ reverse ( ) : this {
192+ return REVERSE < this, u8 > ( this ) ;
193+ }
181194}
182195
183196export class Int16Array extends TypedArray < i16 > {
@@ -228,6 +241,10 @@ export class Int16Array extends TypedArray<i16> {
228241 forEach ( callbackfn : ( value : i16 , index : i32 , self : Int16Array ) => void ) : void {
229242 FOREACH < Int16Array , i16 > ( this , callbackfn ) ;
230243 }
244+
245+ reverse ( ) : this {
246+ return REVERSE < this, i16 > ( this ) ;
247+ }
231248}
232249
233250export class Uint16Array extends TypedArray < u16 > {
@@ -278,6 +295,10 @@ export class Uint16Array extends TypedArray<u16> {
278295 forEach ( callbackfn : ( value : u16 , index : i32 , self : Uint16Array ) => void ) : void {
279296 FOREACH < Uint16Array , u16 > ( this , callbackfn ) ;
280297 }
298+
299+ reverse ( ) : this {
300+ return REVERSE < this, u16 > ( this ) ;
301+ }
281302}
282303
283304export class Int32Array extends TypedArray < i32 > {
@@ -328,6 +349,10 @@ export class Int32Array extends TypedArray<i32> {
328349 forEach ( callbackfn : ( value : i32 , index : i32 , self : Int32Array ) => void ) : void {
329350 FOREACH < Int32Array , i32 > ( this , callbackfn ) ;
330351 }
352+
353+ reverse ( ) : this {
354+ return REVERSE < this, i32 > ( this ) ;
355+ }
331356}
332357
333358export class Uint32Array extends TypedArray < u32 > {
@@ -378,6 +403,10 @@ export class Uint32Array extends TypedArray<u32> {
378403 forEach ( callbackfn : ( value : u32 , index : i32 , self : Uint32Array ) => void ) : void {
379404 FOREACH < Uint32Array , u32 > ( this , callbackfn ) ;
380405 }
406+
407+ reverse ( ) : this {
408+ return REVERSE < this, u32 > ( this ) ;
409+ }
381410}
382411
383412export class Int64Array extends TypedArray < i64 > {
@@ -428,6 +457,10 @@ export class Int64Array extends TypedArray<i64> {
428457 forEach ( callbackfn : ( value : i64 , index : i32 , self : Int64Array ) => void ) : void {
429458 FOREACH < Int64Array , i64 > ( this , callbackfn ) ;
430459 }
460+
461+ reverse ( ) : this {
462+ return REVERSE < this, i64 > ( this ) ;
463+ }
431464}
432465
433466export class Uint64Array extends TypedArray < u64 > {
@@ -478,6 +511,10 @@ export class Uint64Array extends TypedArray<u64> {
478511 forEach ( callbackfn : ( value : u64 , index : i32 , self : Uint64Array ) => void ) : void {
479512 FOREACH < Uint64Array , u64 > ( this , callbackfn ) ;
480513 }
514+
515+ reverse ( ) : this {
516+ return REVERSE < this, u64 > ( this ) ;
517+ }
481518}
482519
483520export class Float32Array extends TypedArray < f32 > {
@@ -528,6 +565,10 @@ export class Float32Array extends TypedArray<f32> {
528565 forEach ( callbackfn : ( value : f32 , index : i32 , self : Float32Array ) => void ) : void {
529566 FOREACH < Float32Array , f32 > ( this , callbackfn ) ;
530567 }
568+
569+ reverse ( ) : this {
570+ return REVERSE < this, f32 > ( this ) ;
571+ }
531572}
532573
533574export class Float64Array extends TypedArray < f64 > {
@@ -578,4 +619,8 @@ export class Float64Array extends TypedArray<f64> {
578619 forEach ( callbackfn : ( value : f64 , index : i32 , self : Float64Array ) => void ) : void {
579620 FOREACH < Float64Array , f64 > ( this , callbackfn ) ;
580621 }
622+
623+ reverse ( ) : this {
624+ return REVERSE < this, f64 > ( this ) ;
625+ }
581626}
0 commit comments