@computed decorator with options.

function computed<Value, Diff = unknown>(
  options?: ComputedOptions<Value, Diff>
): ((
  target: any,
  key: string,
  descriptor: PropertyDescriptor
) => PropertyDescriptor) &
  (<This>(
    compute: () => Value,
    context: ClassMethodDecoratorContext<This, () => Value>
  ) => () => Value)

Parameters

NameDescription

options

ComputedOptions<Value, Diff>

Returns

((
  target: any,
  key: string,
  descriptor: PropertyDescriptor
) => PropertyDescriptor) &
  (<This>(
    compute: () => Value,
    context: ClassMethodDecoratorContext<This, () => Value>
  ) => () => Value)
Prev
atom
Next
getComputedInstance

We use cookies on this website.
Learn more in our Cookie Policy.