Skip to main content
Version: 1.x

@microsoft/fast-foundation > 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

ParameterTypeDescription
valueResolveCallback<K>The callback to call during the first resolution.
Returns:

Resolver<K>

The resolver.