From 4bdef7f72fcae62f3379075492a32a364fc36fa5 Mon Sep 17 00:00:00 2001 From: allipierre Date: Thu, 23 Nov 2017 16:59:32 +0100 Subject: [PATCH] Remove interface confirmOptions --- package.json | 1 + types/concaveman/index.d.ts | 1 + types/confirmdialog/confirmdialog-tests.ts | 61 ------------ types/confirmdialog/index.d.ts | 81 +--------------- types/confirmdialog/tsconfig.json | 3 +- types/confirmdialog/tslint.json | 104 +++++++++++++++------ 6 files changed, 83 insertions(+), 168 deletions(-) diff --git a/package.json b/package.json index 246d0b9d61..61b734fec2 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "lint": "dtslint types" }, "devDependencies": { + "@types/node": "^8.0.53", "dtslint": "github:Microsoft/dtslint#production", "types-publisher": "Microsoft/types-publisher#production", "typescript": "^2.6.1" diff --git a/types/concaveman/index.d.ts b/types/concaveman/index.d.ts index 4c10ca6928..ed5da84fc9 100644 --- a/types/concaveman/index.d.ts +++ b/types/concaveman/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Denis Carriere // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + declare module "concaveman" { /** * A very fast 2D concave hull algorithm in JavaScript (generates a general outline of a point set). diff --git a/types/confirmdialog/confirmdialog-tests.ts b/types/confirmdialog/confirmdialog-tests.ts index 47ba509dc4..e1008442e1 100644 --- a/types/confirmdialog/confirmdialog-tests.ts +++ b/types/confirmdialog/confirmdialog-tests.ts @@ -47,67 +47,6 @@ class Confirm implements server.Iperson { } - public globalSettings(){ - jconfirm.defaults = { - title: 'Hello', - titleClass: '', - type: 'default', - typeAnimated: true, - draggable: true, - dragWindowGap: 15, - dragWindowBorder: true, - animateFromElement: true, - smoothContent: true, - content: 'Are you sure to continue?', - buttons: {}, - defaultButtons: { - ok: { - action: function () { - } - }, - close: { - action: function () { - } - }, - }, - - icon: '', - lazyOpen: false, - bgOpacity: null, - theme: 'light', - animation: 'scale', - closeAnimation: 'scale', - animationSpeed: 400, - animationBounce: 1, - rtl: false, - container: 'body', - containerFluid: false, - backgroundDismiss: false, - backgroundDismissAnimation: 'shake', - autoClose: false, - closeIcon: null, - closeIconClass: false, - watchInterval: 100, - columnClass: 'col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1', - boxWidth: '50%', - scrollToPreviousElement: true, - scrollToPreviousElementAnimate: true, - useBootstrap: true, - offsetTop: 40, - offsetBottom: 40, - bootstrapClasses: { - container: 'container', - containerFluid: 'container-fluid', - row: 'row', - }, - onContentReady: function () {}, - onOpenBefore: function () {}, - onOpen: function () {}, - onClose: function () {}, - onDestroy: function () {}, - onAction: function () {} -}; - } public api(){ var jc = $.confirm({ diff --git a/types/confirmdialog/index.d.ts b/types/confirmdialog/index.d.ts index d20e0f8a27..0f6b49cb5a 100644 --- a/types/confirmdialog/index.d.ts +++ b/types/confirmdialog/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/allipierre/Type-definitions-for-jquery-confirm/tree/master/types/confirmDialog-js // Definitions by: Alli Pierre Yotti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - +// TypeScript Version: 2.3 /// interface JQueryStatic { @@ -10,7 +10,7 @@ * confirm Dialog * @param {confirmOptions} pOtions */ - confirm( pOtions: options.confirmOptions | string, title?:string): boolean | void | HTMLElement | any; + confirm( pOtions: any | string, title?:string): boolean | void | HTMLElement | any; /** * confirm alert @@ -22,81 +22,6 @@ * confirm Dialog * @param {any} pMessage */ - dialog( pOtions: options.confirmOptions | string): void; - -} - - - interface JQuery { - /** - * confirm Dialog - * @param {confirmOptions} pOtions - */ - confirm( pOtions: options.confirmOptions | string, title?:string): boolean | void | HTMLElement | any; - - /** - * confirm alert - * @param {any} pMessage - */ - alert( pMessage?: any, title?:string): void; - - /** - * confirm Dialog - * @param {any} pMessage - */ - dialog( pOtions: options.confirmOptions | any): void; -} - -interface Window { - setContentAppend: any; -} - - - - -declare namespace options { - - interface confirmOptions { - buttons? : buttonOptionss | any, - title? : string | boolean, - content? : string | Function, - onContentReady?: Function, - lazyOpen?: boolean, - closeIcon?: boolean | Function, - type?: string, - typeAnimated?: boolean, - icon?: string, - closeIconClass?: string, - columnClass?: string, - containerFluid?: boolean, - boxWidth?: string, - useBootstrap?: boolean, - bootstrapClasses?: any, - draggable?: boolean, - dragWindowBorder?: boolean, - dragWindowGap?: number, - contentLoaded?: Function, - autoClose?: string, - backgroundDismiss?: boolean | Function | string, - backgroundDismissAnimation?: string, - escapeKey?: string | boolean, - onOpenBefore?:Function, - onOpen?: Function, - onClose?: Function, - onDestroy?: Function, - onAction?: Function - - - } - - interface buttonOptionss { - cancel?: Function, - confirm?: Function - } - -} - -declare namespace jconfirm { - let defaults: any; + dialog( pOtions: any | string): void; } diff --git a/types/confirmdialog/tsconfig.json b/types/confirmdialog/tsconfig.json index 187a733dba..95f33eb036 100644 --- a/types/confirmdialog/tsconfig.json +++ b/types/confirmdialog/tsconfig.json @@ -13,7 +13,8 @@ "typeRoots": ["../"], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "target": "es6" }, "files": [ "index.d.ts", diff --git a/types/confirmdialog/tslint.json b/types/confirmdialog/tslint.json index 2f73ea817c..a41bf5d19a 100644 --- a/types/confirmdialog/tslint.json +++ b/types/confirmdialog/tslint.json @@ -1,31 +1,79 @@ { - "rules": { - "max-line-length": { - "options": [ - 120 - ] - }, - "new-parens": true, - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-consecutive-blank-lines": false, - "no-console": { - "options": [ - "debug", - "info", - "log", - "time", - "timeEnd", - "trace" - ] + "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, + "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 } - }, - "jsRules": { - "max-line-length": { - "options": [ - 120 - ] - } - } }