You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Factory function type for creating a service instance.
164
139
* Accepts an optional configuration object.
@@ -167,82 +142,6 @@ export type ServiceFactory<TService> = (
167
142
config?: ServiceFactoryConfig,
168
143
)=>TService;
169
144
170
-
/**
171
-
* Attributes for service manager and providers.
172
-
* Used for filtering and selecting service providers.
173
-
*/
174
-
exporttypeServiceManagerAttributes=Record<
175
-
ServiceProviderAttributeName,
176
-
unknown
177
-
>;
178
-
179
-
/**
180
-
* Union type for all supported service provider configuration shapes.
181
-
* Used to describe a given service implementation provided.
182
-
*/
183
-
exporttypeServiceProviderConfig=
184
-
|InstanceServiceProviderConfig
185
-
|InstanceBundleServiceProviderConfig
186
-
|FactoryBundleServiceProviderConfig
187
-
|ComponentBundleServiceProviderConfig;
188
-
189
-
/**
190
-
* Common properties for all service provider configurations.
191
-
*
192
-
* These properties are shared by all service provider configuration shapes.
193
-
* A provider config describes how a given service implementation should be resolved by the service manager at runtime (e.g. a direct instance, a bundle exporting an instance or factory, or a React component to be wrapped).
194
-
*
195
-
* @property {number} [ranking] Optional numeric ranking used to order providers when multiple implement the same service. Higher values have higher precedence. Defaults to 0.
196
-
* @property {ServiceManagerAttributes} [attributes] Arbitrary metadata for querying and filtering providers. Either standard attribute names or arbitrary which are also supported.
197
-
*
198
-
* @see ServiceManagerAttributes
199
-
*/
200
-
exporttypeServiceProviderConfigBase={
201
-
ranking?: number;
202
-
203
-
attributes?: ServiceManagerAttributes;
204
-
};
205
-
206
-
/**
207
-
* A provider config describing a concrete service instance.
208
-
*
209
-
* Precedence: when an `instance` property is present it takes precedence over `bundle` and `factory` providers for the same service id. The instance value is used as-is as the provided service.
* A provider config that points to a bundle default exporting a service factory. The factory will be invoked with the provided `config` object to obtain the service instance.
* A provider config that points to a bundle exporting a React component as its default export. The service manager will automatically wrap the component so it can be used as a service; the `props` object will be provided as the component's static props at creation time.
0 commit comments