mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
- Update eslint config to be tighter in control Signed-off-by: Sebastian Malton <sebastian@malton.name>
15 lines
588 B
TypeScript
15 lines
588 B
TypeScript
import { getInjectable } from "@ogre-tools/injectable";
|
|
import { RequestChannel, RequestFromChannel, requestFromChannelInjectionToken } from "@k8slens/messaging";
|
|
|
|
const requestFromChannelInjectable = getInjectable({
|
|
id: "request-from-channel",
|
|
|
|
instantiate: () =>
|
|
(async <Request, Response>(channel: RequestChannel<Request, Response>) => {
|
|
throw new Error(`Tried to request from channel "${channel.id}" from main, which is not supported.`);
|
|
}) as RequestFromChannel,
|
|
injectionToken: requestFromChannelInjectionToken,
|
|
});
|
|
|
|
export default requestFromChannelInjectable;
|