@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
61 lines • 1.34 kB
TypeScript
export default ObservedValue;
declare class ObservedValue {
/**
*
* @template T
* @param {T} v
* @constructor
*/
constructor(v: T);
onChanged: Signal<any, any, any, any, any, any, any, any>;
__value: T;
/**
*
* @type {(function(): T)}
*/
getValue: () => T;
/**
*
* @param {T} value
*/
set(value: T): void;
/**
* Set value without triggering {@link #onChanged} signal
* @param {T} value
* @see #set
*/
setSilent(value: T): void;
/**
*
* @returns {T}
*/
get(): T;
/**
*
* @param {ObservedValue} other
*/
copy(other: ObservedValue): void;
/**
*
* @param {ObservedValue} other
* @returns {boolean}
*/
equals(other: ObservedValue): boolean;
/**
*
* @returns {ObservedValue.<T>}
*/
clone(): any;
/**
* Convenience method, invoked given function with current value and registers onChanged callback
* @param {function} processor
* @param {*} [thisArg]
* @returns {ObservedValue.<T>}
*/
process(processor: Function, thisArg?: any): any;
toString(): string;
toJSON(): T;
fromJSON(value: any): void;
}
import Signal from "../events/signal/Signal.js";
//# sourceMappingURL=ObservedValue.d.ts.map