mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: rename renderer.d.ts in documentation (#40137)
Rename renderer.d.ts This doesn't compile when the declaration name has the same root name as the TS file. https://github.com/Microsoft/TypeScript/issues/7624#issuecomment-202501572 https://stackoverflow.com/questions/59728371/typescript-d-ts-file-not-recognized
This commit is contained in:
@@ -82,9 +82,9 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
})
|
||||
```
|
||||
|
||||
You can create a `renderer.d.ts` declaration file and globally augment the `Window` interface:
|
||||
You can create a `interface.d.ts` declaration file and globally augment the `Window` interface:
|
||||
|
||||
```typescript title='renderer.d.ts' @ts-noisolate
|
||||
```typescript title='interface.d.ts' @ts-noisolate
|
||||
export interface IElectronAPI {
|
||||
loadPreferences: () => Promise<void>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user