doc: fix GPU infoType typings (#19470)

This commit is contained in:
Shelley Vohr 2019-07-26 16:16:38 -07:00 committed by GitHub
parent db3cf52add
commit 5aa1385cfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1021,7 +1021,7 @@ Returns [`GPUFeatureStatus`](structures/gpu-feature-status.md) - The Graphics Fe
### `app.getGPUInfo(infoType)` ### `app.getGPUInfo(infoType)`
* `infoType` String - Values can be either `basic` for basic info or `complete` for complete info. * `infoType` String - Can be `basic` or `complete`.
Returns `Promise<unknown>` Returns `Promise<unknown>`
@ -1225,7 +1225,7 @@ systems Application folder. Use in combination with `app.moveToApplicationsFolde
* `options` Object (optional) * `options` Object (optional)
* `conflictHandler` Function<Boolean> (optional) - A handler for potential conflict in move failure. * `conflictHandler` Function<Boolean> (optional) - A handler for potential conflict in move failure.
* `conflictType` String - the type of move conflict encountered by the handler; can be `exists` or `existsAndRunning`, where `exists` means that an app of the same name is present in the Applications directory and `existsAndRunning` means both that it exists and that it's presently running. * `conflictType` String - The type of move conflict encountered by the handler; can be `exists` or `existsAndRunning`, where `exists` means that an app of the same name is present in the Applications directory and `existsAndRunning` means both that it exists and that it's presently running.
Returns `Boolean` - Whether the move was successful. Please note that if Returns `Boolean` - Whether the move was successful. Please note that if
the move is successful, your application will quit and relaunch. the move is successful, your application will quit and relaunch.

View file

@ -1058,7 +1058,7 @@ describe('app module', () => {
it('fails for invalid info_type', () => { it('fails for invalid info_type', () => {
const invalidType = 'invalid' const invalidType = 'invalid'
const expectedErrorMessage = "Invalid info type. Use 'basic' or 'complete'" const expectedErrorMessage = "Invalid info type. Use 'basic' or 'complete'"
return expect(app.getGPUInfo(invalidType)).to.eventually.be.rejectedWith(expectedErrorMessage) return expect(app.getGPUInfo(invalidType as any)).to.eventually.be.rejectedWith(expectedErrorMessage)
}) })
}) })