turbodombuilder - v0.9.22
    Preparing search index...

    Function blockSignal

    • Function

      Parameters

      • OptionalblockKey: string | number

        the block key, defaults to model.defaultBlockKey

      • Optionalid: string | number

      Returns <
          Type extends
              TurboModel<any, any, any, any, TurboDataBlock<any, any, any, any, any>>,
          Value,
      >(
          value:
              | {
                  get?: (this: Type) => Value;
                  set?: (this: Type, value: Value) => void;
              }
              | ((initial: Value) => Value)
              | ((this: Type) => Value)
              | ((this: Type, v: Value) => void),
          context:
              | ClassFieldDecoratorContext<Type, Value>
              | ClassGetterDecoratorContext<Type, Value>
              | ClassSetterDecoratorContext<Type, Value>
              | ClassAccessorDecoratorContext<Type, Value>,
      ) => any

      blockSignal

      Binds a signal to an entire data-block of a TurboModel/YModel.

      • Getter returns this.getBlockData(blockKey)
      • Setter calls this.setBlock(value, this.getBlockId(blockKey), blockKey)