Interface RenderOptions

The option object passed to Template.render.

Hierarchy

  • RenderOptions

Properties

linebreak?: boolean

Whether to break lines for each template slot. Overridden by linebreakPredicate.

Note that if this option is specified, all trailing \ns are first removed, and it is then evaluated whether to add an \n at the end of the slot.

linebreakPredicate?: {
    args: ((obj) => boolean);
    name: ((name) => boolean);
}

Put a new line in accordance with this predicate. Prioritized than linebreak.

Note that if this option is specified, all trailing \ns are first removed, and it is then evaluated whether to add an \n at the end of the slot.

Type declaration

  • args: ((obj) => boolean)
      • (obj): boolean
      • Whether to put a new line after each template argument. \n is added if the callback is true.

        Parameters

        Returns boolean

  • name: ((name) => boolean)
      • (name): boolean
      • Whether to put a new line after the first template slot for the name. \n is added if the callback is true.

        Parameters

        Returns boolean

nameprop?: "full" | "clean" | "fullclean"

Use the template name of this format. See Template.getName for details.

sortPredicate?: ((obj1, obj2) => number)

Type declaration

subst?: boolean

Whether to add subst: before the template name.

unformatted?: "name" | "value" | "both"

For template arguments, use the unformatted counterpart(s) of name (i.e. ufname), value (i.e. ufvalue), or both, instead of the formatted ones. Note that specifying this option disables the auto-rendering of the name of an unnamed argument whose value contains a =.

Generated using TypeDoc