import { Maybe } from '@terascope/types'; import { WritableData } from './WritableData.js'; /** * A generic readonly optimized view of data used for Vectors. */ export declare class ReadableData implements Iterable> { static emptyData: ReadableData; /** * The values to value index lookup table */ private readonly _values; /** * The number of total number of values stored */ readonly size: number; constructor(data: WritableData); /** * A flag to indicate whether the values stored a javascript primitive. * For example, boolean, string, symbol, number, bigint, etc. * If false the values will require more complicated unique checks * * @default true */ get isPrimitive(): boolean; [Symbol.iterator](): IterableIterator>; /** * Iterate over the non-nil values */ values(): Iterable; /** * Iterate over the non-nil values with indices */ entries(): Iterable<[index: number, value: T]>; /** * Get a value by an index */ get(index: number): Maybe; /** * Check if the contains a particular value */ has(index: number): boolean; /** * Fork the Data object with specific length. * * @param size optionally change the size of the Data */ toWritable(size?: number): WritableData; /** * Create a new Data with the range of values */ slice(start?: number, end?: number): WritableData; /** * Check to see there are any nil values stored */ hasNilValues(): boolean; /** * Get the number of non-nil values */ countValues(): number; /** * Returns true if there are no non-nil values */ isEmpty(): boolean; } //# sourceMappingURL=ReadableData.d.ts.map