Documentation / @warp-drive/core / reactive / fromIdentity
Call Signature
function fromIdentity(
record,
options,
key): string;
Defined in: warp-drive-packages/core/src/reactive/-private/schema.ts:116
A derivation that computes its value from the record's identity.
It can be used via a derived field definition like:
{
kind: 'derived',
name: 'id',
type: '@identity',
options: { key: 'id' }
}
Valid keys are 'id'
, 'lid'
, 'type'
, and '^'
.
^
returns the entire identifier object.
Parameters
record
options
{ key
: "lid"
; } | { key
: "type"
; }
key
string
Returns
string
Call Signature
function fromIdentity(
record,
options,
key): null | string;
Defined in: warp-drive-packages/core/src/reactive/-private/schema.ts:117
A derivation that computes its value from the record's identity.
It can be used via a derived field definition like:
{
kind: 'derived',
name: 'id',
type: '@identity',
options: { key: 'id' }
}
Valid keys are 'id'
, 'lid'
, 'type'
, and '^'
.
^
returns the entire identifier object.
Parameters
record
options
key
"id"
key
string
Returns
null
| string
Call Signature
function fromIdentity(
record,
options,
key): StableRecordIdentifier;
Defined in: warp-drive-packages/core/src/reactive/-private/schema.ts:118
A derivation that computes its value from the record's identity.
It can be used via a derived field definition like:
{
kind: 'derived',
name: 'id',
type: '@identity',
options: { key: 'id' }
}
Valid keys are 'id'
, 'lid'
, 'type'
, and '^'
.
^
returns the entire identifier object.
Parameters
record
options
key
"^"
key
string
Returns
Call Signature
function fromIdentity(
record,
options,
key): asserts options;
Defined in: warp-drive-packages/core/src/reactive/-private/schema.ts:119
A derivation that computes its value from the record's identity.
It can be used via a derived field definition like:
{
kind: 'derived',
name: 'id',
type: '@identity',
options: { key: 'id' }
}
Valid keys are 'id'
, 'lid'
, 'type'
, and '^'
.
^
returns the entire identifier object.
Parameters
record
options
null
key
string
Returns
asserts options