createApiFactory()
Home > @backstage/core-plugin-api
> createApiFactory
Used to infer types for a standalone ApiFactory that isn't immediately passed to another function.
Signature:
function createApiFactory<Api, Impl extends Api>(api: ApiRef<Api>, instance: Impl): ApiFactory<Api, Impl, {}>;
Parameters
Parameter | Type | Description |
---|---|---|
api | ApiRef<Api> | Ref of the API that will be produced by the factory. |
instance | Impl | Implementation of the API to use. |
Returns:
ApiFactory<Api, Impl, {}>