docs: fix app.getPath types so that "name" is a string enum (#19480)
* docs: fix app.getPath types so that "name" is a string enum Fixes https://github.com/electron/typescript-definitions/issues/140 * Update app.md
This commit is contained in:
parent
504407c5df
commit
48f2807473
2 changed files with 22 additions and 24 deletions
|
@ -683,7 +683,7 @@ describe('app module', () => {
|
|||
|
||||
it('throws an error when the name is invalid', () => {
|
||||
expect(() => {
|
||||
app.getPath('does-not-exist')
|
||||
app.getPath('does-not-exist' as any)
|
||||
}).to.throw(/Failed to get 'does-not-exist' path/)
|
||||
})
|
||||
|
||||
|
@ -701,7 +701,7 @@ describe('app module', () => {
|
|||
app.setPath('music', badPath)
|
||||
expect(fs.existsSync(badPath)).to.be.false
|
||||
|
||||
expect(() => { app.getPath(badPath) }).to.throw()
|
||||
expect(() => { app.getPath(badPath as any) }).to.throw()
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue