UNPKG

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.

162 lines (161 loc) 3.34 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; var _a; Object.defineProperty(exports, "__esModule", { value: true }); const rhine_var_base_class_1 = __importDefault(require("../rhine-var-base.class")); const native_type_enum_1 = require("../../native/native-type.enum"); class RhineVarArray extends rhine_var_base_class_1.default { constructor() { super(...arguments); this._type = native_type_enum_1.NativeType.Array; this.length = 0; this[_a] = { copyWithin: true, entries: true, fill: true, find: true, findIndex: true, flat: true, flatMap: true, includes: true, keys: true, values: true, join: true, map: true, reverse: true, slice: true, some: true, splice: true, toLocaleString: true, toString: true, }; } insert(index, ...items) { return -1; } delete(index, length) { return -1; } clear() { } push(...items) { return -1; } unshift(...items) { return -1; } pop() { return undefined; } shift() { return undefined; } slice(start, end) { return []; } splice(start, deleteCount, ...items) { return []; } forEach(callback, thisArg) { } map(callback, thisArg) { return []; } filter(callback, thisArg) { return []; } indexOf(searchElement, fromIndex) { return -1; } lastIndexOf(searchElement, fromIndex) { return -1; } includes(searchElement, fromIndex) { return false; } at(index) { return undefined; } with(index, value) { return []; } join(separator) { return ''; } some(callback, thisArg) { return false; } every(callback, thisArg) { return false; } find(callback, thisArg) { return {}; } findLast(callback, thisArg) { return {}; } findIndex(callback, thisArg) { return -1; } findLastIndex(callback, thisArg) { return -1; } entries() { return {}; } keys() { return {}; } values() { return {}; } reverse() { return this; } sort(compareFn) { return this; } fill(value, start, end) { return this; } concat(...items) { return []; } toReversed() { return []; } toSorted(compareFn) { return []; } toSpliced(start, deleteCount, ...items) { return []; } copyWithin(target, start, end) { return this; } toString() { return ''; } toLocaleString() { return ''; } flat(depth) { return []; } flatMap(callback, thisArg) { return []; } reduce(callback, initialValue) { return {}; } reduceRight(callback, initialValue) { return {}; } [Symbol.iterator]() { return {}; } } _a = Symbol.unscopables; exports.default = RhineVarArray;