Add types for electron-debug 1.1.0

This commit is contained in:
Daniel Perez Alvarez
2016-11-27 16:03:37 +00:00
parent 3e9ed9d35f
commit 01303a6e74
3 changed files with 44 additions and 0 deletions

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
electron-debug/index.d.ts vendored Normal file
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;

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"
]
}