turbodombuilder - v0.9.22
    Preparing search index...

    Function substrate

    • Function

      Parameters

      • Optionalname: string

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

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

      substrate

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

      @tool() protected textSubstrate: TurboSubstrate;
      

      Is equivalent to:

      protected get textSubstrate(): TurboSubstrate {
      if (this.mvc instanceof Mvc) return this.mvc.getSubstrate("text");
      if (typeof this.getSubstrate === "function") return this.getSubstrate("text");
      }