Used to infer types for a standalone ApiFactory that isn't immediately passed to another function.
Creates factory from ApiRef or returns the factory itself if provided.
Existing factory or ApiRef.
The instance to be returned by the factory.
This function doesn't actually do anything, it's only used to infer types.
Ref of the API that will be produced by the factory.
Implementation of the API to use.
Used to infer types for a standalone ApiFactory that isn't immediately passed to another function.
Remarks
Creates factory from ApiRef or returns the factory itself if provided.
Param: factory
Existing factory or ApiRef.
Param: instance
The instance to be returned by the factory.