build: split up into multiple projects, use kotlin DLS
All checks were successful
tagged-release / Tagged Release (push) Successful in 5m23s
All checks were successful
tagged-release / Tagged Release (push) Successful in 5m23s
This commit is contained in:
25
lib/src/stdlib/arrays/Int32Array.ts
Normal file
25
lib/src/stdlib/arrays/Int32Array.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { buffer } from "../primordials.ts";
|
||||
import { abstractIgnore, TypedArray, typedArrayFuncs } from "./TypedArray.ts";
|
||||
|
||||
const factory = buffer.int32;
|
||||
const funcs = typedArrayFuncs(4, factory);
|
||||
|
||||
export class Int32Array extends TypedArray {
|
||||
public subarray(this: number[], start?: number, end?: number) {
|
||||
return funcs.subarray(this, start, end);
|
||||
}
|
||||
public slice(this: any[], start?: number, end?: number) {
|
||||
return funcs.slice(this, start, end);
|
||||
}
|
||||
public map(this: any[], cb: (val: number, i: number, self: any) => number, self?: any) {
|
||||
return funcs.map(this, cb, self);
|
||||
}
|
||||
public filter(this: any[], cb: (val: number, i: number, self: any) => boolean, self?: any) {
|
||||
return funcs.filter(this, cb, self);
|
||||
}
|
||||
|
||||
public constructor(obj: any, start?: number, end?: number) {
|
||||
super(abstractIgnore);
|
||||
return funcs.construct(obj, start, end) as any;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user