docs: type the promises in our docs (#14715)
This commit is contained in:
parent
6b50dc8745
commit
5541cab1ba
5 changed files with 65 additions and 56 deletions
|
@ -460,7 +460,7 @@ Returns `Boolean` - `true` if Electron has finished initializing, `false` otherw
|
|||
|
||||
### `app.whenReady()`
|
||||
|
||||
Returns `Promise` - fulfilled when Electron is initialized.
|
||||
Returns `Promise<void>` - fulfilled when Electron is initialized.
|
||||
May be used as a convenient alternative to checking `app.isReady()`
|
||||
and subscribing to the `ready` event if the app is not ready yet.
|
||||
|
||||
|
|
|
@ -838,7 +838,7 @@ Injects CSS into the current web page.
|
|||
* `callback` Function (optional) - Called after script has been executed.
|
||||
* `result` Any
|
||||
|
||||
Returns `Promise` - A promise that resolves with the result of the executed code
|
||||
Returns `Promise<any>` - A promise that resolves with the result of the executed code
|
||||
or is rejected if the result of the code is a rejected promise.
|
||||
|
||||
Evaluates `code` in page.
|
||||
|
@ -1501,7 +1501,7 @@ be compared to the `frameProcessId` passed by frame specific navigation events
|
|||
|
||||
* `filePath` String - Path to the output file.
|
||||
|
||||
Returns `Promise` - Indicates whether the snapshot has been created successfully.
|
||||
Returns `Promise<void>` - Indicates whether the snapshot has been created successfully.
|
||||
|
||||
Takes a V8 heap snapshot and saves it to `filePath`.
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ Inserts `text` to the focused element.
|
|||
* `callback` Function (optional) - Called after script has been executed.
|
||||
* `result` Any
|
||||
|
||||
Returns `Promise` - A promise that resolves with the result of the executed code
|
||||
Returns `Promise<any>` - A promise that resolves with the result of the executed code
|
||||
or is rejected if the result of the code is a rejected promise.
|
||||
|
||||
Evaluates `code` in page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue