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 Parameter | Default type |
|---|---|
B | - |
N extends string | string |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
author | readonly | StrExpr | The account that wrote this version | packages/core/src/records/contract-builder.ts:648 |
body | readonly | Expr<B> | - | packages/core/src/records/contract-builder.ts:642 |
collection | readonly | StrExpr | - | packages/core/src/records/contract-builder.ts:646 |
createdAt | readonly | StrExpr | When the record was made, by its creator's clock | packages/core/src/records/contract-builder.ts:652 |
creator | readonly | StrExpr | The account that wrote the record's first version | packages/core/src/records/contract-builder.ts:650 |
has | readonly | (field) => BoolExpr | has(body.note): whether a field is there | packages/core/src/records/contract-builder.ts:669 |
hash | readonly | (value) => StrExpr | The content id of a value's canonical JSON; of a body, its bodyHash | packages/core/src/records/contract-builder.ts:667 |
key | readonly | StrExpr | - | packages/core/src/records/contract-builder.ts:644 |
link | readonly | (rel) => StrExpr | What this record's first link with that role points at, or null | packages/core/src/records/contract-builder.ts:665 |
linked | readonly | <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 |
links | readonly | ListExpr<LinkValue> | - | packages/core/src/records/contract-builder.ts:643 |
raw | readonly | <T>(cel) => Expr<T> | CEL written by hand, for what the builder doesn't cover. Its type is yours to say | packages/core/src/records/contract-builder.ts:673 |
seq | readonly | IntExpr | - | packages/core/src/records/contract-builder.ts:645 |
updatedAt | readonly | StrExpr | When this version was written, by its writer's clock | packages/core/src/records/contract-builder.ts:654 |
when | readonly | <R>(test, then, otherwise) => R | test ? then : otherwise | packages/core/src/records/contract-builder.ts:671 |