|
9 | 9 | FIND_INDEX,
|
10 | 10 | SOME,
|
11 | 11 | EVERY,
|
| 12 | + FOREACH, |
12 | 13 | } from "./internal/typedarray";
|
13 | 14 |
|
14 | 15 | import {
|
@@ -63,6 +64,10 @@ export class Int8Array extends TypedArray<i8> {
|
63 | 64 | every(callbackfn: (value: i8, index: i32, self: Int8Array) => bool): bool {
|
64 | 65 | return EVERY<Int8Array, i8>(this, callbackfn);
|
65 | 66 | }
|
| 67 | + |
| 68 | + forEach(callbackfn: (value: i8, index: i32, self: Int8Array) => void): void { |
| 69 | + FOREACH<Int8Array, i8>(this, callbackfn); |
| 70 | + } |
66 | 71 | }
|
67 | 72 |
|
68 | 73 | export class Uint8Array extends TypedArray<u8> {
|
@@ -109,6 +114,10 @@ export class Uint8Array extends TypedArray<u8> {
|
109 | 114 | every(callbackfn: (value: u8, index: i32, self: Uint8Array) => bool): bool {
|
110 | 115 | return EVERY<Uint8Array, u8>(this, callbackfn);
|
111 | 116 | }
|
| 117 | + |
| 118 | + forEach(callbackfn: (value: u8, index: i32, self: Uint8Array) => void): void { |
| 119 | + FOREACH<Uint8Array, u8>(this, callbackfn); |
| 120 | + } |
112 | 121 | }
|
113 | 122 |
|
114 | 123 | export class Uint8ClampedArray extends Uint8Array {
|
@@ -165,6 +174,10 @@ export class Uint8ClampedArray extends Uint8Array {
|
165 | 174 | every(callbackfn: (value: u8, index: i32, self: Uint8ClampedArray) => bool): bool {
|
166 | 175 | return EVERY<Uint8ClampedArray, u8>(this, callbackfn);
|
167 | 176 | }
|
| 177 | + |
| 178 | + forEach(callbackfn: (value: u8, index: i32, self: Uint8ClampedArray) => void): void { |
| 179 | + FOREACH<Uint8ClampedArray, u8>(this, callbackfn); |
| 180 | + } |
168 | 181 | }
|
169 | 182 |
|
170 | 183 | export class Int16Array extends TypedArray<i16> {
|
@@ -211,6 +224,10 @@ export class Int16Array extends TypedArray<i16> {
|
211 | 224 | every(callbackfn: (value: i16, index: i32, self: Int16Array) => bool): bool {
|
212 | 225 | return EVERY<Int16Array, i16>(this, callbackfn);
|
213 | 226 | }
|
| 227 | + |
| 228 | + forEach(callbackfn: (value: i16, index: i32, self: Int16Array) => void): void { |
| 229 | + FOREACH<Int16Array, i16>(this, callbackfn); |
| 230 | + } |
214 | 231 | }
|
215 | 232 |
|
216 | 233 | export class Uint16Array extends TypedArray<u16> {
|
@@ -257,6 +274,10 @@ export class Uint16Array extends TypedArray<u16> {
|
257 | 274 | every(callbackfn: (value: u16, index: i32, self: Uint16Array) => bool): bool {
|
258 | 275 | return EVERY<Uint16Array, u16>(this, callbackfn);
|
259 | 276 | }
|
| 277 | + |
| 278 | + forEach(callbackfn: (value: u16, index: i32, self: Uint16Array) => void): void { |
| 279 | + FOREACH<Uint16Array, u16>(this, callbackfn); |
| 280 | + } |
260 | 281 | }
|
261 | 282 |
|
262 | 283 | export class Int32Array extends TypedArray<i32> {
|
@@ -303,6 +324,10 @@ export class Int32Array extends TypedArray<i32> {
|
303 | 324 | every(callbackfn: (value: i32, index: i32, self: Int32Array) => bool): bool {
|
304 | 325 | return EVERY<Int32Array, i32>(this, callbackfn);
|
305 | 326 | }
|
| 327 | + |
| 328 | + forEach(callbackfn: (value: i32, index: i32, self: Int32Array) => void): void { |
| 329 | + FOREACH<Int32Array, i32>(this, callbackfn); |
| 330 | + } |
306 | 331 | }
|
307 | 332 |
|
308 | 333 | export class Uint32Array extends TypedArray<u32> {
|
@@ -349,6 +374,10 @@ export class Uint32Array extends TypedArray<u32> {
|
349 | 374 | every(callbackfn: (value: u32, index: i32, self: Uint32Array) => bool): bool {
|
350 | 375 | return EVERY<Uint32Array, u32>(this, callbackfn);
|
351 | 376 | }
|
| 377 | + |
| 378 | + forEach(callbackfn: (value: u32, index: i32, self: Uint32Array) => void): void { |
| 379 | + FOREACH<Uint32Array, u32>(this, callbackfn); |
| 380 | + } |
352 | 381 | }
|
353 | 382 |
|
354 | 383 | export class Int64Array extends TypedArray<i64> {
|
@@ -395,6 +424,10 @@ export class Int64Array extends TypedArray<i64> {
|
395 | 424 | every(callbackfn: (value: i64, index: i32, self: Int64Array) => bool): bool {
|
396 | 425 | return EVERY<Int64Array, i64>(this, callbackfn);
|
397 | 426 | }
|
| 427 | + |
| 428 | + forEach(callbackfn: (value: i64, index: i32, self: Int64Array) => void): void { |
| 429 | + FOREACH<Int64Array, i64>(this, callbackfn); |
| 430 | + } |
398 | 431 | }
|
399 | 432 |
|
400 | 433 | export class Uint64Array extends TypedArray<u64> {
|
@@ -441,6 +474,10 @@ export class Uint64Array extends TypedArray<u64> {
|
441 | 474 | every(callbackfn: (value: u64, index: i32, self: Uint64Array) => bool): bool {
|
442 | 475 | return EVERY<Uint64Array, u64>(this, callbackfn);
|
443 | 476 | }
|
| 477 | + |
| 478 | + forEach(callbackfn: (value: u64, index: i32, self: Uint64Array) => void): void { |
| 479 | + FOREACH<Uint64Array, u64>(this, callbackfn); |
| 480 | + } |
444 | 481 | }
|
445 | 482 |
|
446 | 483 | export class Float32Array extends TypedArray<f32> {
|
@@ -487,6 +524,10 @@ export class Float32Array extends TypedArray<f32> {
|
487 | 524 | every(callbackfn: (value: f32, index: i32, self: Float32Array) => bool): bool {
|
488 | 525 | return EVERY<Float32Array, f32>(this, callbackfn);
|
489 | 526 | }
|
| 527 | + |
| 528 | + forEach(callbackfn: (value: f32, index: i32, self: Float32Array) => void): void { |
| 529 | + FOREACH<Float32Array, f32>(this, callbackfn); |
| 530 | + } |
490 | 531 | }
|
491 | 532 |
|
492 | 533 | export class Float64Array extends TypedArray<f64> {
|
@@ -533,4 +574,8 @@ export class Float64Array extends TypedArray<f64> {
|
533 | 574 | every(callbackfn: (value: f64, index: i32, self: Float64Array) => bool): bool {
|
534 | 575 | return EVERY<Float64Array, f64>(this, callbackfn);
|
535 | 576 | }
|
| 577 | + |
| 578 | + forEach(callbackfn: (value: f64, index: i32, self: Float64Array) => void): void { |
| 579 | + FOREACH<Float64Array, f64>(this, callbackfn); |
| 580 | + } |
536 | 581 | }
|
0 commit comments