From 1b8bd0adebd3a26797e3b2c3e21375e36d5df1a3 Mon Sep 17 00:00:00 2001 From: Alexander T Date: Mon, 28 Oct 2019 18:38:15 +0200 Subject: [PATCH] menubar: Provides its own types (#39462) --- notNeededPackages.json | 6 +++ types/menubar/index.d.ts | 64 --------------------------- types/menubar/menubar-tests.ts | 27 ------------ types/menubar/package.json | 6 --- types/menubar/tsconfig.json | 24 ---------- types/menubar/tslint.json | 80 ---------------------------------- 6 files changed, 6 insertions(+), 201 deletions(-) delete mode 100644 types/menubar/index.d.ts delete mode 100644 types/menubar/menubar-tests.ts delete mode 100644 types/menubar/package.json delete mode 100644 types/menubar/tsconfig.json delete mode 100644 types/menubar/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index c1ac7349a8..534028e003 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2130,6 +2130,12 @@ "sourceRepoURL": "http://www.mendix.com", "asOfVersion": "0.8.1" }, + { + "libraryName": "menubar", + "typingsPackageName": "menubar", + "sourceRepoURL": "https://github.com/maxogden/menubar", + "asOfVersion": "6.0.0" + }, { "libraryName": "metisMenu", "typingsPackageName": "metismenu", diff --git a/types/menubar/index.d.ts b/types/menubar/index.d.ts deleted file mode 100644 index 82f9beb586..0000000000 --- a/types/menubar/index.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// Type definitions for menubar 5.1.0 -// Project: https://github.com/maxogden/menubar -// Definitions by: rhysd -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// -/// - -declare namespace Menubar { - type Position - = "trayLeft" - | "trayBottomLeft" - | "trayRight" - | "trayBottomRight" - | "trayCenter" - | "trayBottomCenter" - | "topLeft" - | "topRight" - | "bottomLeft" - | "bottomRight" - | "topCenter" - | "bottomCenter" - | "center"; - type TrayBounds - = "trayLeft" - | "trayBottomLeft" - | "trayRight" - | "trayBottomRight" - | "trayCenter" - | "trayBottomCenter"; - interface ElectronPositioner { - move(pos: Position): void; - calculate(pos: Position, bounds?: TrayBounds): Electron.Point; - } - class MenubarApp extends NodeJS.EventEmitter { - app: Electron.App; - window: Electron.BrowserWindow; - tray: Electron.Tray; - positioner: ElectronPositioner; - - setOption(opt: string, value: any): void; - getOption(opt: string): any; - showWindow(): void; - hideWindow(): void; - } - interface MenubarOptions extends Electron.BrowserWindowConstructorOptions { - dir?: string; - index?: string; - tooltip?: string; - tray?: Electron.Tray; - preloadWindow?: boolean; - alwaysOnTop?: boolean; - showOnAllWorkspaces?: boolean; - windowPosition?: Position; - showDockIcon?: boolean; - showOnRightClick?: boolean; - } -} - -declare module "menubar" { - const ctor: (opts?: Menubar.MenubarOptions) => Menubar.MenubarApp; - export = ctor; -} diff --git a/types/menubar/menubar-tests.ts b/types/menubar/menubar-tests.ts deleted file mode 100644 index 9501574164..0000000000 --- a/types/menubar/menubar-tests.ts +++ /dev/null @@ -1,27 +0,0 @@ -import menubar = require("menubar"); - -var mb1 = menubar(); - -mb1.on("ready", function ready () { - console.log("app is ready") - // your app code here -}) - -var mb2 = menubar({ - index: 'file://path/to/index.html', - icon: '/path/to/icon.png', - width: 400, - height: 800, - preloadWindow: true, - transparent: true, -}); - -mb2.on('ready', () => mb2.showWindow()); - -function toggleWindow() { - if (mb2.window.isFocused()) { - mb2.hideWindow(); - } else { - mb2.showWindow(); - } -} diff --git a/types/menubar/package.json b/types/menubar/package.json deleted file mode 100644 index ea4493add7..0000000000 --- a/types/menubar/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "dependencies": { - "electron": "^1.6.11" - } -} diff --git a/types/menubar/tsconfig.json b/types/menubar/tsconfig.json deleted file mode 100644 index d9d6d843b4..0000000000 --- a/types/menubar/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": false, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "menubar-tests.ts" - ] -} \ No newline at end of file diff --git a/types/menubar/tslint.json b/types/menubar/tslint.json deleted file mode 100644 index 3d59f55fda..0000000000 --- a/types/menubar/tslint.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "npm-naming": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -}