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

remove getAllOnRunHooks

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen 2021-10-05 08:22:56 +03:00
parent a877e109ba
commit 613f84b180
No known key found for this signature in database
GPG Key ID: 54B44603D251B788
2 changed files with 0 additions and 20 deletions

View File

@ -65,16 +65,6 @@ export class CatalogEntityRegistry {
getOnRunHook(catalogEntityUid: CatalogEntity["metadata"]["uid"]): CatelogEntityOnRunHook | undefined { getOnRunHook(catalogEntityUid: CatalogEntity["metadata"]["uid"]): CatelogEntityOnRunHook | undefined {
return registry.getOnRunHook(catalogEntityUid); return registry.getOnRunHook(catalogEntityUid);
} }
/**
* Returns all catalog entities' onRun hooks
*/
getAllOnRunHooks(): Array<{
catalogEntityUid: CatalogEntity["metadata"]["uid"];
onRunHook: CatelogEntityOnRunHook;
}> {
return registry.getAllOnRunHooks();
}
} }
export const catalogEntities = new CatalogEntityRegistry(); export const catalogEntities = new CatalogEntityRegistry();

View File

@ -204,16 +204,6 @@ export class CatalogEntityRegistry {
getOnRunHook(_catalogEntityUid: CatalogEntityUid): CatelogEntityOnRunHook | undefined { getOnRunHook(_catalogEntityUid: CatalogEntityUid): CatelogEntityOnRunHook | undefined {
return Array.from(this.entityOnRunHooks).find(({ catalogEntityUid }) => catalogEntityUid === _catalogEntityUid)?.onRunHook; return Array.from(this.entityOnRunHooks).find(({ catalogEntityUid }) => catalogEntityUid === _catalogEntityUid)?.onRunHook;
} }
/**
* Returns all catalog entities' onRun hooks
*/
getAllOnRunHooks(): Array<{
catalogEntityUid: CatalogEntityUid;
onRunHook: CatelogEntityOnRunHook;
}> {
return Array.from(this.entityOnRunHooks);
}
} }
export const catalogEntityRegistry = new CatalogEntityRegistry(catalogCategoryRegistry); export const catalogEntityRegistry = new CatalogEntityRegistry(catalogCategoryRegistry);