minca
ApiCoreInterfaces

Interface: ComputedContext\<B, N\>

Defined in: packages/core/src/records/contract-builder.ts:641

What a computed field reads of its record, and the functions it calls. It can't read prev, versions or member: those are a contract's, since what a contract reads must be the same on every node.

Type Parameters

Type ParameterDefault type
B-
N extends stringstring

Properties

PropertyModifierTypeDescriptionDefined in
authorreadonlyStrExprThe account that wrote this versionpackages/core/src/records/contract-builder.ts:648
bodyreadonlyExpr<B>-packages/core/src/records/contract-builder.ts:642
collectionreadonlyStrExpr-packages/core/src/records/contract-builder.ts:646
createdAtreadonlyStrExprWhen the record was made, by its creator's clockpackages/core/src/records/contract-builder.ts:652
creatorreadonlyStrExprThe account that wrote the record's first versionpackages/core/src/records/contract-builder.ts:650
hasreadonly(field) => BoolExprhas(body.note): whether a field is therepackages/core/src/records/contract-builder.ts:669
hashreadonly(value) => StrExprThe content id of a value's canonical JSON; of a body, its bodyHashpackages/core/src/records/contract-builder.ts:667
keyreadonlyStrExpr-packages/core/src/records/contract-builder.ts:644
linkreadonly(rel) => StrExprWhat this record's first link with that role points at, or nullpackages/core/src/records/contract-builder.ts:665
linkedreadonly<L>(collection, rel) => ListExpr<Cited<BodyIn<L>>>The records of collection that link to this one with role rel, current and readable on this node: linked(reaction, 'on'). Each has key, author (the account, else the signing key), createdAt, body and links. Pass the definition, and rel is one of its link roles that may point here, and each record's body is typed from its schema. Each lookup runs once per record, however many fields use it.packages/core/src/records/contract-builder.ts:663
linksreadonlyListExpr<LinkValue>-packages/core/src/records/contract-builder.ts:643
rawreadonly<T>(cel) => Expr<T>CEL written by hand, for what the builder doesn't cover. Its type is yours to saypackages/core/src/records/contract-builder.ts:673
seqreadonlyIntExpr-packages/core/src/records/contract-builder.ts:645
updatedAtreadonlyStrExprWhen this version was written, by its writer's clockpackages/core/src/records/contract-builder.ts:654
whenreadonly<R>(test, then, otherwise) => Rtest ? then : otherwisepackages/core/src/records/contract-builder.ts:671

On this page