Skip to content

Commit

Permalink
docs: rename renderer.d.ts in documentation (#40137)
Browse files Browse the repository at this point in the history
Rename renderer.d.ts

This doesn't compile when the declaration name has the same root name as the TS file.

microsoft/TypeScript#7624 (comment)

https://stackoverflow.com/questions/59728371/typescript-d-ts-file-not-recognized
  • Loading branch information
maxtower committed Oct 13, 2023
1 parent ce4ae58 commit dc4476d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial/context-isolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}
Expand Down

0 comments on commit dc4476d

Please sign in to comment.