mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Rename property for accuracy
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
a54d366a24
commit
7a00541599
@ -5,9 +5,9 @@
|
||||
|
||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||
|
||||
export interface Channel<TInstance> {
|
||||
export interface Channel<MessageTemplate> {
|
||||
id: string;
|
||||
_template?: TInstance;
|
||||
_messageTemplate?: MessageTemplate;
|
||||
}
|
||||
|
||||
export const channelInjectionToken = getInjectionToken<Channel<any>>({
|
||||
|
||||
@ -7,7 +7,7 @@ import type { Channel } from "./channel-injection-token";
|
||||
|
||||
export interface ChannelListener<TChannel extends Channel<any>> {
|
||||
channel: TChannel;
|
||||
handler: (value: TChannel["_template"]) => void;
|
||||
handler: (value: TChannel["_messageTemplate"]) => void;
|
||||
}
|
||||
|
||||
export const channelListenerInjectionToken = getInjectionToken<ChannelListener<Channel<any>>>(
|
||||
|
||||
@ -7,7 +7,7 @@ import type { Channel } from "./channel-injection-token";
|
||||
|
||||
export type EnlistChannelListener = <TChannel extends Channel<unknown>>(
|
||||
channel: TChannel,
|
||||
handler: (value: TChannel["_template"]) => void
|
||||
handler: (value: TChannel["_messageTemplate"]) => void
|
||||
) => () => void;
|
||||
|
||||
export const enlistChannelListenerInjectionToken =
|
||||
|
||||
@ -7,7 +7,7 @@ import type { Channel } from "./channel-injection-token";
|
||||
|
||||
export type SendToAgnosticChannel = <TChannel extends Channel<unknown>>(
|
||||
channel: TChannel,
|
||||
message: TChannel["_template"]
|
||||
message: TChannel["_messageTemplate"]
|
||||
) => void;
|
||||
|
||||
export const sendToAgnosticChannelInjectionToken =
|
||||
|
||||
Loading…
Reference in New Issue
Block a user