Merge pull request #28586 from prince0203/add-electron-load-devtool

Add type definitions for electron-load-devtool
This commit is contained in:
Sana Ajani
2018-09-07 16:29:29 -07:00
committed by GitHub
4 changed files with 70 additions and 0 deletions
@@ -0,0 +1,20 @@
import loadDevtool from 'electron-load-devtool';
loadDevtool(loadDevtool.REDUX_DEVTOOLS);
loadDevtool(loadDevtool.EMBER_INSPECTOR);
loadDevtool(loadDevtool.REACT_DEVELOPER_TOOLS);
loadDevtool(loadDevtool.BACKBONE_DEBUGGER);
loadDevtool(loadDevtool.JQUERY_DEBUGGER);
loadDevtool(loadDevtool.ANGULARJS_BATARANG);
loadDevtool(loadDevtool.VUEJS_DEVTOOLS);
loadDevtool('another-devtools-id');
loadDevtool(loadDevtool.REDUX_DEVTOOLS, {
enabled: false
});
loadDevtool(loadDevtool.REDUX_DEVTOOLS, {
name: 'chromium',
profile: 'another-profile-name',
version: '1.2.3'
});
+26
View File
@@ -0,0 +1,26 @@
// Type definitions for electron-load-devtool 1.0
// Project: https://github.com/akameco/electron-load-devtool#readme
// Definitions by: prince <https://github.com/prince0203>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface ElectronLoadDevtool {
(devtoolId: string, options?: ElectronLoadDevtoolOptions): void;
REDUX_DEVTOOLS: string;
EMBER_INSPECTOR: string;
REACT_DEVELOPER_TOOLS: string;
BACKBONE_DEBUGGER: string;
JQUERY_DEBUGGER: string;
ANGULARJS_BATARANG: string;
VUEJS_DEVTOOLS: string;
}
interface ElectronLoadDevtoolOptions {
enabled?: boolean;
name?: string;
profile?: string;
version?: string;
}
declare const electronLoadDevtool: ElectronLoadDevtool;
export default electronLoadDevtool;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"electron-load-devtool-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }