[F] $key
@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
Parameter | Type |
---|---|
context | DecoratorContext |
target | ModelProperty |
altName ? | string |
Returns
void