UNPKG

mobx

Version:

Simple, scalable state management.

13 lines (12 loc) • 744 B
import { IComputedValueOptions, Annotation, IComputedValue, IWritableComputedValue } from "../internal"; import { type DecoratorAnnotation } from "./decoratorannotation"; import type { ClassGetterDecorator } from "../types/decorator_fills"; 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;