import { ApiFactory } from '@backstage/core-plugin-api';
/**
 * Represents a mocked version of an API, where you automatically have access to
 * the mocked versions of all of its methods along with a factory that returns
 * that same mock.
 *
 * @public
 */
export type ApiMock<TApi> = {
    factory: ApiFactory<TApi, TApi, {}>;
} & {
    [Key in keyof TApi]: TApi[Key] extends (...args: infer Args) => infer Return ? TApi[Key] & jest.MockInstance<Return, Args> : TApi[Key];
};
