69 lines
1.6 KiB
TypeScript
69 lines
1.6 KiB
TypeScript
declare const _globalThis: {
|
|
[key: string]: any;
|
|
Zotero: _ZoteroTypes.Zotero;
|
|
ztoolkit: ZToolkit;
|
|
addon: typeof addon;
|
|
};
|
|
|
|
declare type ZToolkit = ReturnType<
|
|
typeof import("../src/utils/ztoolkit").createZToolkit
|
|
>;
|
|
|
|
declare const ztoolkit: ZToolkit;
|
|
|
|
declare const rootURI: string;
|
|
|
|
declare const addon: import("../src/addon").default;
|
|
|
|
declare const __env__: "production" | "development";
|
|
|
|
declare const Zotero_Tabs: {
|
|
selectedID: string;
|
|
};
|
|
|
|
declare const PathUtils: {
|
|
join: (...parts: string[]) => string;
|
|
parent: (path: string) => string;
|
|
tempDir: string;
|
|
};
|
|
|
|
declare const IOUtils: {
|
|
exists: (path: string) => Promise<boolean>;
|
|
read: (path: string) => Promise<Uint8Array>;
|
|
readUTF8: (path: string) => Promise<string>;
|
|
writeUTF8: (path: string, data: string) => Promise<void>;
|
|
remove: (path: string) => Promise<void>;
|
|
makeDirectory: (
|
|
path: string,
|
|
options?: { createAncestors?: boolean; ignoreExisting?: boolean },
|
|
) => Promise<void>;
|
|
stat: (path: string) => Promise<{ size: number }>;
|
|
};
|
|
|
|
declare const Services: {
|
|
appinfo: {
|
|
OS: string;
|
|
};
|
|
};
|
|
|
|
declare const Components: {
|
|
classes: Record<string, { createInstance: (iface: unknown) => unknown }>;
|
|
interfaces: { nsIProcess: unknown };
|
|
utils: {
|
|
isDeadWrapper: (obj: unknown) => boolean;
|
|
};
|
|
};
|
|
|
|
interface MozNsIFile {
|
|
exists: () => boolean;
|
|
isExecutable?: () => boolean;
|
|
}
|
|
|
|
interface MozNsIProcess {
|
|
init: (file: MozNsIFile) => void;
|
|
run: (blocking: boolean, args: string[], count: number) => void;
|
|
runw: (blocking: boolean, args: string[], count: number) => void;
|
|
exitValue: number;
|
|
startHidden: boolean;
|
|
}
|