vasille
Version:
The first Developer eXperience Orientated front-end framework (core library).
37 lines (36 loc) • 910 B
TypeScript
import { IValue } from "../core/ivalue.js";
/**
* r/w pointer to a value
* @class Pointer
* @extends IValue
*/
export declare class Pointer<T> extends IValue<T> {
/**
* pointed value
* @type IValue
*/
protected target: IValue<T> | null;
protected reference: IValue<T>;
/**
* Collection of handlers
* @type Set
*/
protected readonly handler: (value: T) => void;
/**
* Constructs a notifiable bind to a value
* @param value {IValue} is initial valu
*/
constructor(value: IValue<T>);
get $(): T;
set $(v: T);
get $$(): T;
set $$(v: T | IValue<T>);
on(handler: (value: T) => void): void;
off(handler: (value: T) => void): void;
destroy(): void;
protected disconnectTarget(): void;
}
export declare class OwningPointer<T> extends Pointer<T> {
destroy(): void;
protected disconnectTarget(): void;
}