Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
import { BackendModule } from "i18next";
import { BackendModule, TFunction } from "i18next";
import {
readFileRequest,
writeFileRequest,
readFileResponse,
writeFileResponse,
} from './src/index.js'

export type ReadFileRequest = typeof readFileRequest;
export type WriteFileRequest = typeof writeFileRequest;
export type ReadFileResponse = typeof readFileResponse;
export type WriteFileResponse = typeof writeFileResponse;

export interface PreloadBindings {
send: (channel: ReadFileRequest | WriteFileRequest, data?: any) => void;
onReceive: (channel: ReadFileResponse | WriteFileResponse, func: (data?: any) => void) => void;
onLanguageChange: (cb: (args: { lng: string }, t: TFunction) => void) => void;
clientOptions: {
environment: string | undefined;
platform: string;
resourcesPath: string;
}
}

export function mainBindings(ipcMain: Electron.IpcMain, browserWindow: Electron.BrowserWindow, fs: any): any;
export function clearMainBindings(ipcMain: Electron.IpcMain): any;
export function preloadBindings(ipcRenderer: Electron.IpcRenderer, process: NodeJS.Process): any;
export function preloadBindings(ipcRenderer: Electron.IpcRenderer, process: NodeJS.Process): PreloadBindings;

export default {} as BackendModule;
2 changes: 1 addition & 1 deletion lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading