UNPKG

vasille

Version:

The first Developer eXperience Orientated front-end framework (core library).

31 lines (30 loc) 830 B
import { Destroyable } from "./destroyable.js"; /** * Interface which describes a value * @class IValue * @extends Destroyable */ export declare abstract class IValue<T> extends Destroyable { /** * Get the encapsulated value * @return {*} the encapsulated value */ abstract get $(): T; /** * Sets the encapsulated value * @param value {*} value to encapsulate */ abstract set $(value: T); /** * Add a new handler to value change * @param handler {function(value : *)} the handler to add */ abstract on(handler: (value: T) => void): void; /** * Removes a handler of value change * @param handler {function(value : *)} the handler to remove */ abstract off(handler: (value: T) => void): void; toJSON(): T; toString(): string; }