mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
remove other rules in tslint.json
This commit is contained in:
@@ -1,37 +1,27 @@
|
||||
namespace server {
|
||||
export interface Iperson {
|
||||
title: string,
|
||||
content: string,
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class Confirm implements server.Iperson {
|
||||
class Confirm {
|
||||
private title_: string;
|
||||
private conTent_: string;
|
||||
constructor(public title: string, public content: string) {
|
||||
constructor(title: string, content: string) {
|
||||
this.title_ = title;
|
||||
this.conTent_ = content;
|
||||
}
|
||||
|
||||
|
||||
public confirm() {
|
||||
confirm() {
|
||||
$.confirm({
|
||||
title: 'Confirm!',
|
||||
content: 'Simple confirm!',
|
||||
buttons: {
|
||||
confirm: function() {
|
||||
confirm: () => {
|
||||
$.alert('Confirmed!');
|
||||
},
|
||||
cancel: function(cancel: string) {
|
||||
cancel: (cancel: string) => {
|
||||
$.alert('Canceled! ' + cancel);
|
||||
},
|
||||
somethingElse: {
|
||||
text: 'Something else',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter', 'shift'],
|
||||
action: function() {
|
||||
action: () => {
|
||||
alert('Something else?');
|
||||
}
|
||||
}
|
||||
@@ -39,15 +29,14 @@ class Confirm implements server.Iperson {
|
||||
});
|
||||
}
|
||||
|
||||
public alert() {
|
||||
alert() {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Simple alert!',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public globalSettings(){
|
||||
globalSettings() {
|
||||
jconfirm.defaults = {
|
||||
title: 'Hello',
|
||||
titleClass: '',
|
||||
@@ -62,11 +51,11 @@ class Confirm implements server.Iperson {
|
||||
buttons: {},
|
||||
defaultButtons: {
|
||||
ok: {
|
||||
action: function () {
|
||||
action: () => {
|
||||
}
|
||||
},
|
||||
close: {
|
||||
action: function () {
|
||||
action: () => {
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -100,46 +89,41 @@ class Confirm implements server.Iperson {
|
||||
containerFluid: 'container-fluid',
|
||||
row: 'row',
|
||||
},
|
||||
onContentReady: function () {},
|
||||
onOpenBefore: function () {},
|
||||
onOpen: function () {},
|
||||
onClose: function () {},
|
||||
onDestroy: function () {},
|
||||
onAction: function () {}
|
||||
onContentReady: () => {},
|
||||
onOpenBefore: () => {},
|
||||
onOpen: () => {},
|
||||
onClose: () => {},
|
||||
onDestroy: () => {},
|
||||
onAction: () => {}
|
||||
};
|
||||
}
|
||||
|
||||
public api(){
|
||||
var jc = $.confirm({
|
||||
api() {
|
||||
const jc = $.confirm({
|
||||
title: 'awesome',
|
||||
onContentReady: function(){
|
||||
// this === jc
|
||||
//jc.setTitle(title: string);
|
||||
onContentReady: () => {
|
||||
jc.setTitle();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public confirm_84() {
|
||||
confirm_84() {
|
||||
$.confirm({
|
||||
closeIcon: true,
|
||||
buttons: {
|
||||
buttonA: {
|
||||
text: 'button a',
|
||||
action: function (buttonA: HTMLElement) {
|
||||
|
||||
action: (buttonA: string) => {
|
||||
return false; // prevent the modal from closing
|
||||
}
|
||||
},
|
||||
resetButton: function (resetButton: string) {
|
||||
resetButton: (resetButton: string) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
var firstName: string = 'Pierre';
|
||||
var lastName: string = 'Yotti';
|
||||
var type = new Confirm(firstName, lastName);
|
||||
let firstName = 'Pierre';
|
||||
let lastName = 'Yotti';
|
||||
let type = new Confirm(firstName, lastName);
|
||||
|
||||
Vendored
+38
-47
@@ -1,8 +1,9 @@
|
||||
// Type definitions for confirmdialog v3.3.0
|
||||
// Type definitions for confirmdialog 3.3
|
||||
// Project: https://github.com/allipierre/Type-definitions-for-jquery-confirm/tree/master/types/confirmDialog-js
|
||||
// Definitions by: Alli Pierre Yotti <https://github.com/allipierre>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="jquery"/>
|
||||
|
||||
interface JQueryStatic {
|
||||
@@ -10,93 +11,83 @@
|
||||
* confirm Dialog
|
||||
* @param {confirmOptions} pOtions
|
||||
*/
|
||||
confirm( pOtions: options.confirmOptions | string, title?:string): boolean | void | HTMLElement | any;
|
||||
confirm(pOtions: options.confirmOptions | string, title?: string): any;
|
||||
|
||||
/**
|
||||
* confirm alert
|
||||
* @param {any} pMessage
|
||||
*/
|
||||
alert( pMessage?: any | string, title?:string): void;
|
||||
alert(pMessage?: any | string, title?: string): any;
|
||||
|
||||
/**
|
||||
* confirm Dialog
|
||||
* @param {any} pMessage
|
||||
*/
|
||||
dialog( pOtions: options.confirmOptions | string): void;
|
||||
|
||||
dialog(pOtions: options.confirmOptions | string): any;
|
||||
}
|
||||
|
||||
|
||||
interface JQuery {
|
||||
/**
|
||||
* confirm Dialog
|
||||
* @param {confirmOptions} pOtions
|
||||
*/
|
||||
confirm( pOtions: options.confirmOptions | string, title?:string): boolean | void | HTMLElement | any;
|
||||
confirm(pOtions: options.confirmOptions | string, title?: string): any;
|
||||
|
||||
/**
|
||||
* confirm alert
|
||||
* @param {any} pMessage
|
||||
*/
|
||||
alert( pMessage?: any, title?:string): void;
|
||||
alert(pMessage?: any, title?: string): any;
|
||||
|
||||
/**
|
||||
* confirm Dialog
|
||||
* @param {any} pMessage
|
||||
*/
|
||||
dialog( pOtions: options.confirmOptions | any): void;
|
||||
dialog(pOtions: options.confirmOptions | any): any;
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
|
||||
buttons?: buttonOptionss | any;
|
||||
title?: string | boolean;
|
||||
content?: any;
|
||||
onContentReady?: any;
|
||||
lazyOpen?: boolean;
|
||||
closeIcon?: boolean | any;
|
||||
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?: () => void;
|
||||
autoClose?: string;
|
||||
backgroundDismiss?: boolean | any | string;
|
||||
backgroundDismissAnimation?: string;
|
||||
escapeKey?: string | boolean;
|
||||
onOpenBefore?: () => void;
|
||||
onOpen?: () => void;
|
||||
onClose?: () => void;
|
||||
onDestroy?: () => void;
|
||||
onAction?: () => void;
|
||||
}
|
||||
|
||||
interface buttonOptionss {
|
||||
cancel?: Function,
|
||||
confirm?: Function
|
||||
cancel?: () => void;
|
||||
confirm?: () => void;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
declare namespace jconfirm {
|
||||
let defaults: any;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,79 +1 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
Vendored
+2
-3
@@ -1,9 +1,8 @@
|
||||
// Type definitions for Notifier
|
||||
// Type definitions for notifier 1.0
|
||||
// Project: https://github.com/allipierre/jquery-notifier
|
||||
// Definitions by: Alli Pierre Yotti <https://github.com/allipierre>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
declare namespace notifier {
|
||||
/**
|
||||
* notifier.show(title, msg, type, icon, timeout);
|
||||
@@ -14,6 +13,6 @@ declare namespace notifier {
|
||||
* @param {timeout} timeout
|
||||
*/
|
||||
function show(title: string, msg: string, type: string, icon: string, timeout?: number): string | number;
|
||||
function hide(notificationId: string | number): boolean;
|
||||
|
||||
function hide(notificationId: string | number): boolean;
|
||||
}
|
||||
|
||||
@@ -4,33 +4,28 @@ notifier.show('Well Done!', 'You just submit your resume successfuly.', '', '',
|
||||
notifier.show('Warning!', 'The data presented here can be change.', '', '', 0);
|
||||
notifier.show('Sorry!', 'Could not complete your transaction.', '', '', 0);
|
||||
|
||||
|
||||
notifier.show('Default!', 'I am a default notification.', '', 'img/clock-48.png', 0);
|
||||
notifier.show('Reminder!', 'You have a meeting at 10:30 AM.', '', 'img/survey-48.png', 0);
|
||||
notifier.show('Well Done!', 'You just submit your resume successfuly.', '', 'img/ok-48.png', 0);
|
||||
notifier.show('Warning!', 'The data presented here can be change.', '', 'img/medium_priority-48.png', 0);
|
||||
notifier.show('Sorry!', 'Could not complete your transaction.', '', 'img/high_priority-48.png', 0);
|
||||
|
||||
|
||||
|
||||
notifier.show('Default!', 'I am a default notification.', '', 'img/clock-48.png', 4000);
|
||||
notifier.show('Reminder!', 'You have a meeting at 10:30 AM.', '', 'img/survey-48.png', 4000);
|
||||
notifier.show('Well Done!', 'You just submit your resume successfuly.', '', 'img/ok-48.png', 4000);
|
||||
notifier.show('Warning!', 'The data presented here can be change.', '', 'img/medium_priority-48.png', 4000);
|
||||
notifier.show('Sorry!', 'Could not complete your transaction.', '', 'img/high_priority-48.png', 4000);
|
||||
|
||||
let notificationId: string | number;
|
||||
|
||||
let showNotification = () => {
|
||||
notificationId = notifier.show('Reminder!', 'You have a meeting at 10:30 AM.', '', 'img/survey-48.png', 4000);
|
||||
};
|
||||
|
||||
let hideNotification = () => {
|
||||
notifier.hide(notificationId);
|
||||
};
|
||||
|
||||
var notificationId:string | number;
|
||||
document.querySelector('#btn-nt-show').addEventListener('click', showNotification);
|
||||
|
||||
var showNotification = function () {
|
||||
notificationId = notifier.show('Reminder!', 'You have a meeting at 10:30 AM.', '', 'img/survey-48.png', 4000);
|
||||
};
|
||||
|
||||
var hideNotification = function () {
|
||||
notifier.hide(notificationId);
|
||||
};
|
||||
|
||||
document.querySelector('#btn-nt-show').addEventListener('click', showNotification);
|
||||
document.querySelector('#btn-nt-hide').addEventListener('click', hideNotification);
|
||||
document.querySelector('#btn-nt-hide').addEventListener('click', hideNotification);
|
||||
|
||||
@@ -1,79 +1 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
Reference in New Issue
Block a user