vasille
Version:
The same framework which is designed to build bulletproof frontends (core library).
47 lines (46 loc) • 1.21 kB
TypeScript
import { Reactive } from "../core/core.js";
import { Destroyable } from "../core/destroyable.js";
import { IValue } from "../core/ivalue.js";
import { Reference } from "./reference.js";
/**
* Forward only link type
* @class Forward
* @extends Reference
*/
export declare class Forward<T> extends Reference<T> implements Destroyable {
/**
* forwarded value
* @type IValue
*/
protected target: IValue<T>;
/**
* Handler to receive updates from forwarded value
*/
protected readonly handler: (value: T) => void;
/**
* Constructs a value forwarder
* @param value {IValue} is source of forwarded data
* @param ctx lifetime context
*/
constructor(value: IValue<T>, ctx?: Reactive);
destroy(): void;
}
/**
* Backward only link type
* @class Backward
* @extends Reference
*/
export declare class Backward<T> extends Reference<T> {
/**
* target, which receive the updates
* @type IValue
*/
protected target: IValue<T>;
/**
* Constructs a value backward stream
* @param value {IValue} target, which receive the updates
*/
constructor(value: IValue<T>);
get V(): T;
set V(value: T);
}