mobx
Version:
Simple, scalable state management.
15 lines (14 loc) • 845 B
TypeScript
import { IComputedValueOptions, Annotation, IComputedValue, IWritableComputedValue } from "../internal";
import { type DecoratorAnnotation } from "./decoratorannotation";
import type { ClassGetterDecorator } from "../types/decorator_fills";
export declare const COMPUTED = "computed";
export declare const COMPUTED_STRUCT = "computedStruct";
export interface IComputedFactory extends Annotation, ClassGetterDecorator {
<T>(options: IComputedValueOptions<T>): DecoratorAnnotation<ClassGetterDecorator>;
<T>(func: () => T, options: IComputedValueOptions<T> & {
set: (value: T) => void;
}): IWritableComputedValue<T>;
<T>(func: () => T, options?: IComputedValueOptions<T>): IComputedValue<T>;
}
export declare const computedStruct: DecoratorAnnotation<ClassGetterDecorator>;
export declare const computed: IComputedFactory;