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";
|
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||||
|
|
||||||
export interface Channel<TInstance> {
|
export interface Channel<MessageTemplate> {
|
||||||
id: string;
|
id: string;
|
||||||
_template?: TInstance;
|
_messageTemplate?: MessageTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const channelInjectionToken = getInjectionToken<Channel<any>>({
|
export const channelInjectionToken = getInjectionToken<Channel<any>>({
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import type { Channel } from "./channel-injection-token";
|
|||||||
|
|
||||||
export interface ChannelListener<TChannel extends Channel<any>> {
|
export interface ChannelListener<TChannel extends Channel<any>> {
|
||||||
channel: TChannel;
|
channel: TChannel;
|
||||||
handler: (value: TChannel["_template"]) => void;
|
handler: (value: TChannel["_messageTemplate"]) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const channelListenerInjectionToken = getInjectionToken<ChannelListener<Channel<any>>>(
|
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>>(
|
export type EnlistChannelListener = <TChannel extends Channel<unknown>>(
|
||||||
channel: TChannel,
|
channel: TChannel,
|
||||||
handler: (value: TChannel["_template"]) => void
|
handler: (value: TChannel["_messageTemplate"]) => void
|
||||||
) => () => void;
|
) => () => void;
|
||||||
|
|
||||||
export const enlistChannelListenerInjectionToken =
|
export const enlistChannelListenerInjectionToken =
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import type { Channel } from "./channel-injection-token";
|
|||||||
|
|
||||||
export type SendToAgnosticChannel = <TChannel extends Channel<unknown>>(
|
export type SendToAgnosticChannel = <TChannel extends Channel<unknown>>(
|
||||||
channel: TChannel,
|
channel: TChannel,
|
||||||
message: TChannel["_template"]
|
message: TChannel["_messageTemplate"]
|
||||||
) => void;
|
) => void;
|
||||||
|
|
||||||
export const sendToAgnosticChannelInjectionToken =
|
export const sendToAgnosticChannelInjectionToken =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user