Skip to content

[F] $singleton

function $singleton(
context,
target,
keyValue?): void

This decorator is used to mark a resource type as a โ€œsingletonโ€, a type with only one instance. The standard set of resource operations can be applied to such a resource type, they will generate the correct routes and parameter lists.

Parameters

ParameterType
contextDecoratorContext
targetModel
keyValue?string

Returns

void