1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make overriding injectable with a mock supported

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2021-11-19 10:13:50 +02:00
parent d07d9f9fd2
commit 0c0dfe5966

View File

@ -38,7 +38,12 @@ declare module "@ogre-tools/injectable" {
override: <TInjectable extends IInjectable<TInstance, any>, TInstance>(
injectable: TInjectable,
overrider: ReturnType<TInjectable["instantiate"]>,
overrider:
| ReturnType<TInjectable["instantiate"]>
| jest.MockInstance<
ReturnType<TInjectable["instantiate"]>,
ReturnType<TInjectable["getDependencies"]>
>,
) => void;
}