Merge pull request #12939 from unindented/types-2.0

Add types for electron-debug 1.1.0
This commit is contained in:
Paul van Brenk
2016-11-29 15:39:05 -08:00
committed by GitHub
3 changed files with 44 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
import debug = require('electron-debug')
debug({enabled: false});
debug({showDevTools: true});
debug({showDevTools: 'right'});
debug({showDevTools: 'bottom'});
debug({showDevTools: 'undocked'});
+17
View File
@@ -0,0 +1,17 @@
// Type definitions for electron-debug v1.1.0
// Project: https://github.com/sindresorhus/electron-debug
// Definitions by: Daniel Perez Alvarez <https://github.com/unindented>
// 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;
+19
View File
@@ -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"
]
}