mobx-sentinel API doc
    Preparing search index...

    Annotation for nested objects

    • Mixed nested modes for the same key are not allowed
    • Parameters

      • target: object
      • propertyKey: string | symbol

      Returns void

    • Parameters

      • value: (this: object) => any
      • context: ClassGetterDecoratorContext

      Returns void | (this: object) => any

    • Parameters

      • value: ClassAccessorDecoratorTarget<object, any>
      • context: ClassAccessorDecoratorContext

      Returns void | ClassAccessorDecoratorResult<object, any>

    • Parameters

      • value: undefined
      • context: ClassFieldDecoratorContext<object, any>

      Returns any

    Index

    Properties

    Properties

    hoist: PropertyDecorator<object> & ClassGetterDecorator<object, any> & ClassAccessorDecorator<
        object,
        any,
    > & ClassFieldDecorator<object, any> = createNestedHoist

    Annotation for nested objects that should be hoisted to the parent object

    When using hoist mode:

    • Nested objects are treated as part of the parent object
    • Changes and errors from nested objects appear on the parent
    • Multiple hoisted keys within the same inheritance chain are not allowed
    @nested.hoist @observable private list: Sample[] = [];
    // Key path for "list.0.value" becomes "0.value"