turbodombuilder - v0.9.22
    Preparing search index...

    Function tool

    • Function

      Parameters

      • Optionalname: string

        The key name of the tool in the MVC instance (if any). By default, it is inferred from the name of the field. If the field is named somethingTool, the key name will be something.

      Returns (_unused: unknown, context: ClassFieldDecoratorContext) => void

      tool

      Stage-3 field decorator for MVC structure. It reduces code by turning the decorated field into a fetched tool.

      @tool() protected textTool: TurboTool;
      

      Is equivalent to:

      protected get textTool(): TurboTool {
      if (this.mvc instanceof Mvc) return this.mvc.getTool("text");
      if (typeof this.getTool === "function") return this.getTool("text");
      }