Heatzy API for Node.js - v21.3.1
    Preparing search index...

    Variable settingConst

    setting: (
        target: ClassAccessorDecoratorTarget<HasSettingManager, string>,
        context: ClassAccessorDecoratorContext,
    ) => ClassAccessorDecoratorResult<HasSettingManager, string>

    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.

    Type Declaration

      • (
            target: ClassAccessorDecoratorTarget<HasSettingManager, string>,
            context: ClassAccessorDecoratorContext,
        ): ClassAccessorDecoratorResult<HasSettingManager, string>
      • 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.