Function
Optional
The key name of the constrainer in the MVC instance (if any). By default, it is inferred from the name of the field. If the field is named somethingConstrainer, the key name will be something.
somethingConstrainer
something
constrainer
Stage-3 field decorator for MVC structure. It reduces code by turning the decorated field into a fetched constrainer.
@tool() protected textConstrainer: GradumConstrainer; Copy
@tool() protected textConstrainer: GradumConstrainer;
Is equivalent to:
protected get textConstrainer(): GradumConstrainer { if (this.mvc instanceof Mvc) return this.mvc.getConstrainer("text"); if (typeof this.getConstrainer === "function") return this.getConstrainer("text");} Copy
protected get textConstrainer(): GradumConstrainer { if (this.mvc instanceof Mvc) return this.mvc.getConstrainer("text"); if (typeof this.getConstrainer === "function") return this.getConstrainer("text");}
The key name of the constrainer in the MVC instance (if any). By default, it is inferred from the name of the field. If the field is named
somethingConstrainer, the key name will besomething.