chore: update @electron/lint-roller and improve doc type checks (#39262)
This commit is contained in:
parent
2b283724ce
commit
68701c4c3c
6 changed files with 22 additions and 16 deletions
|
@ -84,7 +84,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
|||
|
||||
You can create a `renderer.d.ts` declaration file and globally augment the `Window` interface:
|
||||
|
||||
```typescript title='renderer.d.ts'
|
||||
```typescript title='renderer.d.ts' @ts-noisolate
|
||||
export interface IElectronAPI {
|
||||
loadPreferences: () => Promise<void>,
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ declare global {
|
|||
|
||||
Doing so will ensure that the TypeScript compiler will know about the `electronAPI` property on your global `window` object when writing scripts in your renderer process:
|
||||
|
||||
```typescript title='renderer.ts' @ts-nocheck
|
||||
```typescript title='renderer.ts'
|
||||
window.electronAPI.loadPreferences()
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue