Skip to content
HomePagesHomePages template kit

compute

Marks a slot's value as derived from `Facts` at render time rather than bound to a source field.

Marks a slot’s value as derived from Facts at render time rather than bound to a source field. fn must be synchronous — see NoPromise.

Import from @homepages/template-kit.

function compute<T>(fn: (f: Facts) => NoPromise<T>): ComputeBinding<T>
Name Type Required Description
fn (f: Facts) => NoPromise<T> required

ComputeBinding<T>