The template string
The names of the parameters (after the iterable) of the returned function (which can be 'seen' inside the template string)
The name of the current item of the iterable as seen inside the template string. Defaults to 'item'
The text that goes between the rendered items. Defaults to the empty string.
Supply a tagName argument to change the name of the tag function inside the template string if the default name (T) is present in argNames.
let t = asyncArrayTemplate('I will async render this ${item}')([1, 2, 3, 4, 5].map(i => Promise.resolve(i)));
console.log(t instanceof Promise); // true
t = await t
// t === 'I will async render this 1I will async render this 2I will async render this 3I will async render this 4I will async render this 5'
Async equivalent of arrayTemplate. The async template tag ('T' by default) is applied to the template string. Use this when there are promises among the arguents that will be passed to the returned function.