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.
Signature
Section titled “Signature”function compute<T>(fn: (f: Facts) => NoPromise<T>): ComputeBinding<T>Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
fn |
(f: Facts) => NoPromise<T> |
required |
Returns
Section titled “Returns”ComputeBinding<T>