Skip to content

[F] $key

function $key(
context,
target,
altName?): void

@key - mark a model property as the key to identify instances of that type

The optional first argument accepts an alternate key name which may be used by emitters. Otherwise, the name of the target property will be used.

@key can only be applied to model properties.

Parameters

ParameterType
contextDecoratorContext
targetModelProperty
altName?string

Returns

void