vue-mvvm / core / ReadableGlobalContext
ReadableGlobalContext
Provides a read-only interface for accessing the global context
Extended by
Methods
getProviders()
ts
getProviders(): Component[];Return all registered providers
Returns
Component[]
getService()
Call Signature
ts
getService<T>(key): InstanceType<T>;Retrieves a service instance corresponding to the provided class or constructor function.
Type Parameters
T
T extends (...args) => any
Parameters
key
T
The class or constructor function that represents the service to retrieve.
Returns
InstanceType<T>
An instance of the service represented by the provided class or constructor function.
Call Signature
ts
getService<T>(key): T;Retrieves a service instance based on the passed ServiceKey
Type Parameters
T
T
Parameters
key
ServiceKey<T>
The ServiceKey connected with the service
Returns
T
Call Signature
ts
getService<T>(key): Promise<T>;Retrieves a service instance based on the passed AsyncServiceKey. The services are resolved async.
Type Parameters
T
T
Parameters
key
The AsyncServiceKey connected with the service
Returns
Promise<T>