rhine-var
Version:
Variables that support multi-user collaboration and persistence, making collaboration and variable operations as simple as possible, with strict and well-defined type hints.
71 lines • 3.48 kB
TypeScript
import RhineVarBase from "../rhine-var-base.class";
import { NativeType } from "../../native/native-type.enum";
import { InputItem } from "../rhine-var.type";
export default class RhineVarArray<T = any, N = any> extends RhineVarBase<T[]> implements Iterable<T> {
_type: NativeType.Array;
[key: number]: T;
length: number;
insert(index: number, ...items: InputItem<N>[]): number;
delete(index: number, length: number): number;
clear(): void;
push(...items: InputItem<N>[]): number;
unshift(...items: InputItem<N>[]): number;
pop(): N | undefined;
shift(): N | undefined;
slice(start?: number, end?: number): T[];
splice(start: number, deleteCount?: number, ...items: InputItem<N>[]): N[];
forEach(callback: (value: T, index: number, array: this) => void, thisArg?: any): void;
map<U>(callback: (value: T, index: number, array: this) => U, thisArg?: any): U[];
filter(callback: (value: T, index: number, array: this) => boolean, thisArg?: any): T[];
indexOf(searchElement: InputItem<N>, fromIndex?: number): number;
lastIndexOf(searchElement: InputItem<N>, fromIndex?: number): number;
includes(searchElement: InputItem<N>, fromIndex?: number): boolean;
at(index: number): T | undefined;
with(index: number, value: InputItem<N>): N[];
join(separator?: string): string;
some(callback: (value: T, index: number, array: this) => boolean, thisArg?: any): boolean;
every(callback: (value: T, index: number, array: this) => boolean, thisArg?: any): boolean;
find(callback: (value: T, index: number, obj: this) => boolean, thisArg?: any): T | undefined;
findLast(callback: (value: T, index: number, obj: this) => boolean, thisArg?: any): T | undefined;
findIndex(callback: (value: T, index: number, obj: this) => boolean, thisArg?: any): number;
findLastIndex(callback: (value: T, index: number, obj: this) => boolean, thisArg?: any): number;
entries(): IterableIterator<[number, T]>;
keys(): IterableIterator<number>;
values(): IterableIterator<T>;
reverse(): this;
sort(compareFn?: (a: T, b: T) => number): this;
fill(value: InputItem<N>, start?: number, end?: number): this;
concat(...items: InputItem<N>[]): N[];
toReversed(): N[];
toSorted(compareFn?: (a: T, b: T) => number): N[];
toSpliced(start: number, deleteCount?: number, ...items: InputItem<N>[]): N[];
copyWithin(target: number, start: number, end?: number): this;
toString(): string;
toLocaleString(): string;
flat<U>(depth?: number): U[];
flatMap<U>(callback: (value: T, index: number, array: this) => U, thisArg?: any): U[];
reduce<U>(callback: (previousValue: U, currentValue: T, currentIndex: number, array: this) => U, initialValue: U): U;
reduceRight<U>(callback: (previousValue: U, currentValue: T, currentIndex: number, array: this) => U, initialValue: U): U;
[Symbol.iterator](): Iterator<T>;
[Symbol.unscopables]: {
copyWithin: boolean;
entries: boolean;
fill: boolean;
find: boolean;
findIndex: boolean;
flat: boolean;
flatMap: boolean;
includes: boolean;
keys: boolean;
values: boolean;
join: boolean;
map: boolean;
reverse: boolean;
slice: boolean;
some: boolean;
splice: boolean;
toLocaleString: boolean;
toString: boolean;
};
}
//# sourceMappingURL=rhine-var-array.class.d.ts.map