示例工程 33-clipboard-dnd-fs
33-clipboard-dnd-fs/app/.tsc/shared/ipc.d.ts
export declare const CH: {
readonly get: "clipboard:get";
readonly readClipboard: "clipboard:read";
readonly writeText: "clipboard:write-text";
readonly writeHtml: "clipboard:write-html";
readonly readPath: "fs:read-path";
readonly pickFile: "fs:pick";
readonly refreshRecent: "fs:refresh-recent";
readonly clearRecent: "fs:clear-recent";
};
export type ClipboardInfo = {
formats: string[];
text: string;
html: string;
error: string;
};
export type RecentEntry = {
path: string;
name: string;
ext: string;
size: number;
exists: boolean;
at: number;
error: string;
};
export type FilePreview = {
ok: boolean;
path: string;
name: string;
ext: string;
size: number;
content: string;
error: string;
};
export type Samples = {
notes: string;
config: string;
big: string;
wrong: string;
missing: string;
};
export type Snapshot = {
platform: string;
clipboard: ClipboardInfo;
lastFile: FilePreview | null;
recent: RecentEntry[];
samples: Samples;
};
export declare function assertTextReq(value: unknown): asserts value is {
text: string;
};
export declare function assertHtmlReq(value: unknown): asserts value is {
html: string;
};
export declare function assertPathReq(value: unknown): asserts value is {
path: string;
};
//# sourceMappingURL=ipc.d.ts.map