From 01303a6e7464e5a4d217c4c2d4e52681d659dec7 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 27 Nov 2016 16:03:37 +0000 Subject: [PATCH] Add types for electron-debug 1.1.0 --- electron-debug/electron-debug-tests.ts | 8 ++++++++ electron-debug/index.d.ts | 17 +++++++++++++++++ electron-debug/tsconfig.json | 19 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 electron-debug/electron-debug-tests.ts create mode 100644 electron-debug/index.d.ts create mode 100644 electron-debug/tsconfig.json diff --git a/electron-debug/electron-debug-tests.ts b/electron-debug/electron-debug-tests.ts new file mode 100644 index 0000000000..15910e76d7 --- /dev/null +++ b/electron-debug/electron-debug-tests.ts @@ -0,0 +1,8 @@ +import debug = require('electron-debug') + +debug({enabled: false}); + +debug({showDevTools: true}); +debug({showDevTools: 'right'}); +debug({showDevTools: 'bottom'}); +debug({showDevTools: 'undocked'}); diff --git a/electron-debug/index.d.ts b/electron-debug/index.d.ts new file mode 100644 index 0000000000..4806b7ccf5 --- /dev/null +++ b/electron-debug/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for electron-debug v1.1.0 +// Project: https://github.com/sindresorhus/electron-debug +// Definitions by: Daniel Perez Alvarez +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Install keyboard shortcuts and optionally activate DevTools on each + * created BrowserWindow. + */ +declare function electronDebug(options: { + /** Enable debug options. */ + enabled?: boolean; + /** Show DevTools on each created BrowserWindow. */ + showDevTools?: boolean | 'right' | 'bottom' | 'undocked'; +}): void; + +export = electronDebug; diff --git a/electron-debug/tsconfig.json b/electron-debug/tsconfig.json new file mode 100644 index 0000000000..c43a839ee3 --- /dev/null +++ b/electron-debug/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "electron-debug-tests.ts" + ] +}