chore: update @electron/lint-roller and improve doc type checks (#39262)

This commit is contained in:
David Sanders 2023-07-31 01:39:01 -07:00 committed by GitHub
parent 2b283724ce
commit 68701c4c3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 16 deletions

View file

@ -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()
```