From 114a9c3af44a3ec357cc802163f6140e26b40a2f Mon Sep 17 00:00:00 2001 From: kPherox Date: Wed, 10 Apr 2019 16:23:26 +0900 Subject: [PATCH] Type declare for electron-localshortcut --- package.json | 2 +- tsconfig.json | 4 ++++ types/electron-localshortcut.d.ts | 8 ++++++++ {src => types}/shims-tsx.d.ts | 0 {src => types}/shims-vue.d.ts | 0 5 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 types/electron-localshortcut.d.ts rename {src => types}/shims-tsx.d.ts (100%) rename {src => types}/shims-vue.d.ts (100%) diff --git a/package.json b/package.json index c2953013..d280a85a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "thedesk-vue", - "version": "0.2", + "version": "0.2.0", "private": true, "description": "TheDesk is a Mastodon client for PC.", "author": { diff --git a/tsconfig.json b/tsconfig.json index 7f5e2acd..b94c0a87 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,9 @@ "webpack-env" ], "paths": { + "*": [ + "types/*" + ], "@/*": [ "src/*" ] @@ -28,6 +31,7 @@ ] }, "include": [ + "types/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", diff --git a/types/electron-localshortcut.d.ts b/types/electron-localshortcut.d.ts new file mode 100644 index 00000000..4ea35680 --- /dev/null +++ b/types/electron-localshortcut.d.ts @@ -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 \ No newline at end of file diff --git a/src/shims-tsx.d.ts b/types/shims-tsx.d.ts similarity index 100% rename from src/shims-tsx.d.ts rename to types/shims-tsx.d.ts diff --git a/src/shims-vue.d.ts b/types/shims-vue.d.ts similarity index 100% rename from src/shims-vue.d.ts rename to types/shims-vue.d.ts