mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
23 lines
852 B
TypeScript
23 lines
852 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import { asLegacyGlobalForExtensionApi } from "./as-legacy-global-object-for-extension-api";
|
|
import type { Injectable } from "@ogre-tools/injectable";
|
|
|
|
/**
|
|
* @deprecated use asLegacyGlobalForExtensionApi instead, and use proper implementations instead of "modifications".
|
|
*/
|
|
export const asLegacyGlobalObjectForExtensionApiWithModifications = <
|
|
InjectableInstance extends InjectionTokenInstance & object,
|
|
InjectionTokenInstance,
|
|
ModificationObject extends object,
|
|
>(
|
|
injectable: Injectable<InjectableInstance, InjectionTokenInstance, void>,
|
|
modificationObject: ModificationObject,
|
|
) =>
|
|
Object.assign(
|
|
asLegacyGlobalForExtensionApi(injectable),
|
|
modificationObject,
|
|
);
|