mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
@@ -7,13 +7,13 @@ import type {
|
||||
handlers as mainHandlers,
|
||||
} from '@affine/electron/main/exposed';
|
||||
import type { appInfo as exposedAppInfo } from '@affine/electron/preload/electron-api';
|
||||
import type { sharedStorage as exposedSharedStorage } from '@affine/electron/preload/shared-storage';
|
||||
import type { SharedStorage } from '@affine/electron/preload/shared-storage';
|
||||
|
||||
type MainHandlers = typeof mainHandlers;
|
||||
type HelperHandlers = typeof helperHandlers;
|
||||
type HelperEvents = typeof helperEvents;
|
||||
type MainEvents = typeof mainEvents;
|
||||
type ClientHandler = {
|
||||
export type ClientHandler = {
|
||||
[namespace in keyof MainHandlers]: {
|
||||
[method in keyof MainHandlers[namespace]]: MainHandlers[namespace][method] extends (
|
||||
arg0: any,
|
||||
@@ -27,17 +27,19 @@ type ClientHandler = {
|
||||
: never;
|
||||
};
|
||||
} & HelperHandlers;
|
||||
type ClientEvents = MainEvents & HelperEvents;
|
||||
export type ClientEvents = MainEvents & HelperEvents;
|
||||
|
||||
export const appInfo = (globalThis as any).__appInfo as
|
||||
| typeof exposedAppInfo
|
||||
| null;
|
||||
export const apis = (globalThis as any).__apis as ClientHandler | null;
|
||||
export const events = (globalThis as any).__events as ClientEvents | null;
|
||||
export const apis = (globalThis as any).__apis as ClientHandler | undefined;
|
||||
export const events = (globalThis as any).__events as ClientEvents | undefined;
|
||||
|
||||
export const sharedStorage = (globalThis as any).__sharedStorage as
|
||||
| typeof exposedSharedStorage
|
||||
| null;
|
||||
| SharedStorage
|
||||
| undefined;
|
||||
|
||||
export type { SharedStorage };
|
||||
|
||||
export type { UpdateMeta } from '@affine/electron/main/updater/event';
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user