import type { DataPointExistsConditionNode } from "../flow/index.js"; import type { NBTObject, RootNBT } from '../arguments/index.js'; import type { DataPointPickClass } from '../core/index.js'; import type { ConditionNode } from '../flow/index.js'; import type { LiteralUnion, NonEmptyString } from '../utils.js'; import type { Macroable } from '../core/Macro.js'; import { ConditionalDataPointPickClass } from '../core/Macro.js'; import type { SandstonePack } from '../pack/index.js'; import { DataPointClass, StringDataPointClass } from './Data.js'; import { Score } from './Score.js'; export declare abstract class IterableDataClass extends ConditionalDataPointPickClass { iteratorType: TYPE; constructor(sandstoneCore: SandstonePack['core'], iteratorType: TYPE); iterator(_callback: (dataPoints: TYPE extends 'list' ? [DataPointClass] : [StringDataPointClass, DataPointClass]) => void, _direction?: 'normal' | 'reverse'): () => void; size(): DataPointClass<'storage'>; last(): readonly [StringDataPointClass, DataPointClass] | DataPointClass; continue(direction?: 'normal' | 'reverse'): ConditionNode; } type GetKeys = T extends unknown[] ? T extends [] ? never : '0' extends keyof T ? Exclude : number : keyof T; export type DataIndexMapInitial = RootNBT | Record; export declare class DataIndexMapClass extends IterableDataClass<'map'> { private pack; entries: Record; dataPoint: NonNullable>; constructor(pack: SandstonePack, initialize: INITIAL, dataPoint?: DataPointClass<'storage'>); private init; __entryIterator?: DataPointClass<'storage'>; entryIterator(direction: 'normal' | 'reverse'): DataPointClass<"storage">; iterator(callback: (data: [key: StringDataPointClass, value: DataPointClass]) => void, direction?: 'normal' | 'reverse'): () => void; continue(direction?: 'normal' | 'reverse'): /* */DataPointExistsConditionNode; /** * Use in conjunction with a Score to get the count of entries. * * @example * Variable(map.size(), 'map_size') * * @returns The entries of the map. */ size: () => DataPointClass<"storage">; last: () => readonly [key: StringDataPointClass, value: DataPointClass]; /** * @returns The index of the entry. */ set(key: Macroable>, true>, value: NBTObject | DataPointClass | DataPointPickClass): number | Score; get(key: GetKeys): INITIAL[typeof key] extends DataPointClass ? INITIAL[typeof key] : DataPointClass<'storage'>; get(key: Macroable): DataPointClass<'storage'>; remove(key: Macroable>, true>): this; _toDataPoint: () => DataPointClass<"storage">; _toMinecraftCondition(): /* */DataPointExistsConditionNode; } export type DataArrayInitial = readonly NBTObject[] | readonly [string, DataPointClass | DataPointPickClass]; export declare class DataArrayClass extends IterableDataClass<'list'> { private pack; dataPoint: NonNullable>; constructor(pack: SandstonePack, initialize: INITIAL, dataPoint?: DataPointClass<'storage'>); private init; __entryIterator?: DataPointClass<'storage'>; entryIterator(direction: 'normal' | 'reverse'): DataPointClass<"storage">; iterator(callback: (data: [entry: DataPointClass]) => void, direction?: 'normal' | 'reverse'): () => void; continue(direction?: 'normal' | 'reverse'): /* */DataPointExistsConditionNode; /** * Use in conjunction with a Score to get the count of entries. * * @example * Variable(array.size(), 'array_size') * * @returns The entries of the array. */ size: () => DataPointClass<"storage">; last: () => DataPointClass<"storage">; set(index: Score | number, value: NBTObject | DataPointClass | DataPointPickClass): this; push(value: NBTObject | DataPointClass | DataPointPickClass): this; unshift(value: NBTObject | DataPointClass | DataPointPickClass): this; get(index: Score | number): DataPointClass<"storage">; remove(index: Score | number): this; _toDataPoint: () => DataPointClass<"storage">; _toMinecraftCondition(): /* */DataPointExistsConditionNode; } export declare function DataIndexMapInternal(pack: SandstonePack, initialize: INITIAL, dataPoint?: DataPointClass<'storage'>): DataIndexMapClass & { [K in keyof INITIAL]: DataIndexMapInitial[NonEmptyString]; } & { [K in string]: DataIndexMapInitial[NonEmptyString]; }; export type DataIndexMapType = DataIndexMapClass & { [K in keyof INITIAL]: DataIndexMapInitial[NonEmptyString]; } & { [K in string]: DataIndexMapInitial[NonEmptyString]; }; export declare function DataArrayInternal(pack: SandstonePack, initialize: INITIAL, dataPoint?: DataPointClass<'storage'>): DataArrayClass & { [K in keyof INITIAL]: DataArrayInitial[number]; } & { [K in number]: DataArrayInitial[number]; }; export type DataArrayType = DataArrayClass & { [K in keyof INITIAL]: DataArrayInitial[number]; } & { [K in number]: DataArrayInitial[number]; }; export {}; //# sourceMappingURL=DataSets.d.ts.map