1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/features/cluster/delete-dialog/common/delete-channel.ts
Sebastian Malton 13ba8dea84 Add better type safety around Channels
- Reallow non-JSON serializable complex types

- Remove unnecessary JSON serialization step to IPC

- Remove unnecesary injectable-ization of MessageChannel and
  RequestChannel declarations

- Add channel listener injectable getter function to remove general need
  for type casting and improve type safety

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-10-07 15:07:01 -04:00

13 lines
484 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { ClusterId } from "../../../../common/cluster-types";
import type { RequestChannel } from "../../../../common/utils/channel/request-channel-listener-injection-token";
export type DeleteClusterChannel = RequestChannel<ClusterId, void>;
export const deleteClusterChannel: DeleteClusterChannel = {
id: "delete-cluster",
};