示例工程 31-notifications-taskbar
31-notifications-taskbar/app/.tsc/shared/ipc.d.ts
export declare const CH: {
readonly get: "notify:get";
readonly preview: "notify:preview";
readonly send: "notify:send";
readonly simulateClick: "notify:simulate-click";
readonly setBadge: "notify:set-badge";
readonly setProgress: "notify:set-progress";
readonly bounce: "notify:bounce";
readonly clear: "notify:clear";
readonly changed: "notify:changed";
};
export type Urgency = "low" | "normal" | "critical";
export type ProgressMode = "none" | "normal" | "indeterminate" | "error" | "paused";
export type NotifyPayload = {
title: string;
body: string;
silent: boolean;
urgency: Urgency;
};
export type Redacted = {
title: string;
body: string;
hits: string[];
};
export type NotifyLog = {
at: number;
kind: "show" | "click" | "close" | "failed" | "badge" | "progress" | "bounce";
text: string;
};
export type Capabilities = {
notifications: boolean;
actions: boolean;
badge: boolean;
progress: boolean;
overlay: boolean;
bounce: boolean;
};
export type NotifySnapshot = {
platform: string;
capabilities: Capabilities;
supported: boolean;
lastPayload: Redacted | null;
badge: string;
progress: number;
mode: ProgressMode;
lastClicked: string;
log: NotifyLog[];
};
export declare function assertPreviewReq(value: unknown): asserts value is {
title: string;
body: string;
};
export declare function assertSendReq(value: unknown): asserts value is NotifyPayload;
export declare function assertBadgeReq(value: unknown): asserts value is {
text: string;
};
export declare function assertProgressReq(value: unknown): asserts value is {
value: number;
mode: ProgressMode;
};
//# sourceMappingURL=ipc.d.ts.map