Type declare for electron-localshortcut

This commit is contained in:
kPherox 2019-04-10 16:23:26 +09:00
parent 057add9270
commit 114a9c3af4
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
5 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "thedesk-vue", "name": "thedesk-vue",
"version": "0.2", "version": "0.2.0",
"private": true, "private": true,
"description": "TheDesk is a Mastodon client for PC.", "description": "TheDesk is a Mastodon client for PC.",
"author": { "author": {

View File

@ -16,6 +16,9 @@
"webpack-env" "webpack-env"
], ],
"paths": { "paths": {
"*": [
"types/*"
],
"@/*": [ "@/*": [
"src/*" "src/*"
] ]
@ -28,6 +31,7 @@
] ]
}, },
"include": [ "include": [
"types/**/*.d.ts",
"src/**/*.ts", "src/**/*.ts",
"src/**/*.tsx", "src/**/*.tsx",
"src/**/*.vue", "src/**/*.vue",

8
types/electron-localshortcut.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
import { BrowserWindow, Accelerator } from 'electron'
export function disableAll(win: BrowserWindow): void
export function enableAll(win: BrowserWindow): void
export function isRegistered(win: BrowserWindow, accelerator: Accelerator): void
export function register(win: BrowserWindow, accelerator: Accelerator, callback: () => void): void
export function unregister(win: BrowserWindow, accelerator: Accelerator): void
export function unregisterAll(win: BrowserWindow): void