import { Reference } from './createRef'; export type ReferenceMap = Map> & Record> & { /** * Maps the references in this group to a new array. * * @param callback - The function to transform each reference. * * @returns An array of the transformed references. */ mapRefs(callback: (value: T, index: number) => TValue): TValue[]; }; /** * Create a group of references. * * @remarks * The returned object lets you easily create multiple references to the same * type without initializing them individually. * * You can retrieve references by accessing the object's properties. If the * reference for a given property does not exist, it will be created * automatically. * * @example * ```tsx * const labels = createRefMap(); * * view.add( * <> * A * B * C * , * ); * * // accessing the references individually: * yield* labels.a().text('A changes', 0.3); * yield* labels.b().text('B changes', 0.3); * yield* labels.c().text('C changes', 0.3); * * // checking if the given reference exists: * if ('d' in labels) { * yield* labels.d().text('D changes', 0.3); * } * * // accessing all references at once: * yield* all(...labels.mapRefs(label => label.fill('white', 0.3))); * ``` */ export declare function createRefMap(): ReferenceMap; //# sourceMappingURL=createRefMap.d.ts.map