Skip to main content

Type Alias: TemplateValue<T>

type TemplateValue<T>: MaybePromise<T> | (ctx) => MaybePromise<T>;

Template helper value that can be static, lazy (Promise), or computed from the EmailContext at render time.

Type Parameters

Type Parameter
T

Examples

'Welcome to Robo.js'
(ctx) => `Welcome, ${ctx.user.name ?? 'friend'}`
async () => fetchCopyFromCMS()