From 3a84e4eed4b4dc2fa67fdbb131c068c09fc58fbc Mon Sep 17 00:00:00 2001 From: allipierre Date: Thu, 23 Nov 2017 15:40:52 +0100 Subject: [PATCH] remove some errors --- package.json | 6 ++-- types/confirmdialog/confirmdialog-tests.ts | 3 -- types/confirmdialog/index.d.ts | 8 ++++-- types/confirmdialog/tsconfig.json | 1 + types/confirmdialog/tslint.json | 32 +++++++++++++++++++++- 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index bef061f5bf..246d0b9d61 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,12 @@ }, "devDependencies": { "dtslint": "github:Microsoft/dtslint#production", - "types-publisher": "Microsoft/types-publisher#production" + "types-publisher": "Microsoft/types-publisher#production", + "typescript": "^2.6.1" }, "dependencies": { "@types/jquery": "^3.2.16", - "jquery": "^3.2.1" + "jquery": "^3.1.1", + "typescript": "^2.6.1" } } diff --git a/types/confirmdialog/confirmdialog-tests.ts b/types/confirmdialog/confirmdialog-tests.ts index 77812221af..47ba509dc4 100644 --- a/types/confirmdialog/confirmdialog-tests.ts +++ b/types/confirmdialog/confirmdialog-tests.ts @@ -1,6 +1,3 @@ -import * as $ from 'jquery'; - - namespace server { export interface Iperson { title: string, diff --git a/types/confirmdialog/index.d.ts b/types/confirmdialog/index.d.ts index ade096d977..d20e0f8a27 100644 --- a/types/confirmdialog/index.d.ts +++ b/types/confirmdialog/index.d.ts @@ -3,13 +3,14 @@ // Definitions by: Alli Pierre Yotti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// -interface JQueryStatic { + interface JQueryStatic { /** * confirm Dialog * @param {confirmOptions} pOtions */ - confirm( pOtions: options.confirmOptions | string, title?:string): boolean | void | HTMLElement | any; + confirm( pOtions: options.confirmOptions | string, title?:string): boolean | void | HTMLElement | any; /** * confirm alert @@ -26,7 +27,7 @@ interface JQueryStatic { } -interface JQuery { + interface JQuery { /** * confirm Dialog * @param {confirmOptions} pOtions @@ -52,6 +53,7 @@ interface Window { + declare namespace options { interface confirmOptions { diff --git a/types/confirmdialog/tsconfig.json b/types/confirmdialog/tsconfig.json index 76f091224e..187a733dba 100644 --- a/types/confirmdialog/tsconfig.json +++ b/types/confirmdialog/tsconfig.json @@ -8,6 +8,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": ["../"], "types": [], diff --git a/types/confirmdialog/tslint.json b/types/confirmdialog/tslint.json index 3db14f85ea..2f73ea817c 100644 --- a/types/confirmdialog/tslint.json +++ b/types/confirmdialog/tslint.json @@ -1 +1,31 @@ -{ "extends": "dtslint/dt.json" } +{ + "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" + ] + } + }, + "jsRules": { + "max-line-length": { + "options": [ + 120 + ] + } + } +}