mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make different MessageChannels not require explicit "extends JsonObject"
Note: Non-escaped lint breaks type here for forcing interface over type. Reasonable effort brought no understanding for what is the relevant difference between the two. Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
parent
2fc30f6ce5
commit
ac4642ec04
@ -3,7 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { JsonObject } from "type-fest";
|
||||
import type { MessageChannel } from "../channel/message-channel-injection-token";
|
||||
import { messageChannelInjectionToken } from "../channel/message-channel-injection-token";
|
||||
|
||||
@ -13,7 +12,8 @@ export type ApplicationUpdateStatusEventId =
|
||||
| "download-for-update-started"
|
||||
| "download-for-update-failed";
|
||||
|
||||
export interface ApplicationUpdateStatusChannelMessage extends JsonObject { eventId: ApplicationUpdateStatusEventId; version?: string }
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export type ApplicationUpdateStatusChannelMessage = { eventId: ApplicationUpdateStatusEventId; version?: string };
|
||||
export type ApplicationUpdateStatusChannel = MessageChannel<ApplicationUpdateStatusChannelMessage>;
|
||||
|
||||
const applicationUpdateStatusChannelInjectable = getInjectable({
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { JsonObject } from "type-fest";
|
||||
import type { MessageChannel } from "../channel/message-channel-injection-token";
|
||||
import { messageChannelInjectionToken } from "../channel/message-channel-injection-token";
|
||||
|
||||
export interface AskBooleanQuestionParameters extends JsonObject { id: string; title: string; question: string }
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||
export type AskBooleanQuestionParameters = { id: string; title: string; question: string };
|
||||
export type AskBooleanQuestionChannel = MessageChannel<AskBooleanQuestionParameters>;
|
||||
|
||||
const askBooleanQuestionChannelInjectable = getInjectable({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user