Question: type of Window.api
mdruuu opened this issue · comments
Unemployed Capital commented
Clear and concise description of the problem
Hi,
I am wondering why the api type is set as 'unknown' vs electron being ElectronAPI?
import { ElectronAPI } from '@electron-toolkit/preload'
declare global {
interface Window {
electron: ElectronAPI
api: unknown
}
}
Thank you
Used Scaffolding
create-electron
Suggested solution
n/a
Alternative
No response
Additional context
No response
Validations
- Follow the Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
alex.wei commented
You can define specific types according to your own module.