SingletonSelector
Index
Methods
get
Returns a StarlightItemResponse with a single Singleton. This methods supports typing the returned Singleton by passing its data type as the generic type
<D>.Type parameters
- D: SerializedData
The type of the returned Singleton’s
dataproperty.
Parameters
slug: string
The singleton slug.
optionalparams: BaseRequestParameters
An optional object of request parameters.
optionaloptions: RequestInit
An optional object of fetch options. See https://developer.mozilla.org/en-US/docs/Web/API/RequestInit for more info.
Returns Promise<StarlightItemResponse<Singleton<D>>>
- D: SerializedData
list
Returns a StarlightListResponse with a list of Singletons.
Parameters
optionalparams: BaseRequestParameters
An optional object of request parameters.
optionaloptions: RequestInit
An optional object of fetch options. See https://developer.mozilla.org/en-US/docs/Web/API/RequestInit for more info.
Returns Promise<StarlightListResponse<Singleton<Record<string, unknown>>>>
A Selector that provide methods to list and request information on Singletons.
You can use an SingletonSelector by accessing ModelInstance.singletons.