mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
22 lines
603 B
TypeScript
22 lines
603 B
TypeScript
import { getInjectable } from "@ogre-tools/injectable";
|
|
import {
|
|
RequestChannel,
|
|
RequestFromChannel,
|
|
requestFromChannelInjectionToken,
|
|
} from "@k8slens/messaging";
|
|
|
|
const requestFromChannelInjectable = getInjectable({
|
|
id: "request-from-channel",
|
|
|
|
instantiate: () =>
|
|
((channel: RequestChannel<any, any>) => {
|
|
throw new Error(
|
|
`Tried to request from channel "${channel.id}" but requesting in "main" it's not supported yet`,
|
|
);
|
|
}) as unknown as RequestFromChannel,
|
|
|
|
injectionToken: requestFromChannelInjectionToken,
|
|
});
|
|
|
|
export default requestFromChannelInjectable;
|