alex8088 / quick-start

An easy way to start a front-end project.
MIT License
248 stars 34 forks source link

Question: type of Window.api #20

Closed mdruuu closed 10 months ago

mdruuu commented 11 months ago

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

alex8088 commented 11 months ago

You can define specific types according to your own module.