Interface ClassAccessorDecoratorResult<This, Value>

    Describes the allowed return value from a class accessor field decorator.

    interface ClassAccessorDecoratorResult<This, Value> {
        get?(this: This): Value;
        init?(this: This, value: Value): Value;
        set?(this: This, value: Value): void;
    }

    Type Parameters

    • This

      The this type to which the target applies.

    • Value

      The property type for the class accessor field.

    Methods

    Methods

    • An optional replacement getter function. If not provided, the existing getter function is used instead.

      Parameters

      Returns Value

    • An optional initializer mutator that is invoked when the underlying field initializer is evaluated.

      Parameters

      • this: This
      • value: Value

        The incoming initializer value.

      Returns Value

      The replacement initializer value.

    • An optional replacement setter function. If not provided, the existing setter function is used instead.

      Parameters

      Returns void