// preloader index.ts
export type api = typeof api
// preloader index.d.ts
import { ElectronAPI } from '@electron-toolkit/preload'
import type { api } from './index'
declare global {
interface Window {
electron: ElectronAPI
api: api
}
}
Additional context
What is the purpose of this pull request?
[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other
Before submitting the PR, please make sure you do the following
Description
Using
typeof
to resolve manual type definition.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).