import { PixelColorway, PixelDieType } from "@systemic-games/pixels-core-animation"; import { EventReceiver } from "@systemic-games/pixels-core-utils"; import { PixelInfo } from "./PixelInfo"; import { PixelRollState } from "./PixelRollState"; /** * The mutable properties of {@link PixelInfoNotifier}. * @category Pixels */ export type PixelInfoNotifierMutableProps = Pick; /** * Abstract implementation of {@link PixelInfo} type with the addition * of events that are emitted when mutable properties change. * The concrete implementation is responsible of calling the * {@link PixelInfoNotifier.emitPropertyEvent()} function when a property is mutated. * @category Pixels */ export declare abstract class PixelInfoNotifier implements PixelInfo { static MutablePropsList: readonly (keyof PixelInfo)[]; private readonly _infoEvEmitter; abstract type: "die" | "charger" | "bootloader"; readonly isNotifier = true; abstract get systemId(): string; abstract get pixelId(): number; abstract get name(): string; abstract get ledCount(): number; abstract get colorway(): PixelColorway; abstract get dieType(): PixelDieType; abstract get firmwareDate(): Date; abstract get rssi(): number; abstract get batteryLevel(): number; abstract get isCharging(): boolean; abstract get rollState(): PixelRollState; abstract get currentFace(): number; abstract get currentFaceIndex(): number; constructor(); /** * Adds the given listener function for the specified property. * @param propertyName The name of the property. * @param listener The callback function. */ addPropertyListener(propertyName: K, listener: EventReceiver): void; /** * Removes the given listener function for the specified property. * @param propertyName The name of the property. * @param listener The callback function to unregister. */ removePropertyListener(propertyName: K, listener: EventReceiver): void; /** * Emit a Pixel event for the specified property. * This function should be called by the concrete type whenever * the a property's value changes. * @param propertyName Event name. */ protected emitPropertyEvent(propertyName: K): void; } //# sourceMappingURL=PixelInfoNotifier.d.ts.map