ResolverBuilder.cachedCallback() method
@microsoft/fast-element/di.js > ResolverBuilder > cachedCallback
ResolverBuilder.cachedCallback() method
Creates a resolver that invokes a callback function the first time that a dependency resolution is requested. The returned value is then cached and provided for all subsequent requests.
Signature:
cachedCallback(value: ResolveCallback<K>): Resolver<K>;
Parameters
Parameter | Type | Description |
---|---|---|
value | The callback to call during the first resolution. |
Returns:
Resolver<K>
The resolver.