API Core - v1.5.0
    Preparing search index...

    Function setting

    • Accessor decorator that delegates storage to an external SettingManager (e.g. persistent settings), falling back to the in-memory field when none is configured. The setting key is resolved once at decoration time rather than on every get/set.

      The key IS the accessor name (String(context.name)) — the storage contract of every host that already persists these fields, so renaming a decorated accessor renames its stored key and strands the previous value. Never derive the key any other way.

      Parameters

      • target: ClassAccessorDecoratorTarget<HasSettingManager, string>

        The underlying accessor descriptor provided by the runtime.

      • context: ClassAccessorDecoratorContext

        The accessor decoration context carrying the property name.

      Returns ClassAccessorDecoratorResult<HasSettingManager, string>

      The replacement accessor that routes through settingManager when present.