mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Fixing tslint errors
This commit is contained in:
Vendored
+86
-86
@@ -1,4 +1,4 @@
|
||||
// Type definitions for jquery.nicescroll 3.7.6
|
||||
// Type definitions for jquery.nicescroll 3.7
|
||||
// Project: https://nicescroll.areaaperta.com
|
||||
// Definitions by: Bohdan Stupak <https://github.com/Wkalmar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -8,98 +8,98 @@
|
||||
|
||||
declare namespace JQueryNiceScroll {
|
||||
interface NiceScrollPage {
|
||||
maxw: number
|
||||
maxh: number
|
||||
width: number
|
||||
height: number
|
||||
w: number
|
||||
h: number
|
||||
maxw: number;
|
||||
maxh: number;
|
||||
width: number;
|
||||
height: number;
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
|
||||
|
||||
interface NiceScroll {
|
||||
show(): NiceScroll
|
||||
hide(): NiceScroll
|
||||
toggle(): NiceScroll
|
||||
onResize(e?: Event, page?: NiceScrollPage): NiceScroll
|
||||
resize(e?: Event, page?: NiceScrollPage): NiceScroll
|
||||
remove(): void
|
||||
stop(): NiceScroll
|
||||
doScrollPos(x: number, y: number, spd: number): void
|
||||
doScrollLeft(x: number, duration: number): void
|
||||
doScrollTop(x: number, duration: number): void
|
||||
show(): NiceScroll;
|
||||
hide(): NiceScroll;
|
||||
toggle(): NiceScroll;
|
||||
onResize(e?: Event, page?: NiceScrollPage): NiceScroll;
|
||||
resize(e?: Event, page?: NiceScrollPage): NiceScroll;
|
||||
remove(): void;
|
||||
stop(): NiceScroll;
|
||||
doScrollPos(x: number, y: number, spd: number): void;
|
||||
doScrollLeft(x: number, duration: number): void;
|
||||
doScrollTop(x: number, duration: number): void;
|
||||
}
|
||||
|
||||
|
||||
interface NiceScrollOptions {
|
||||
zindex?: "auto" | number
|
||||
cursoropacitymin?: number
|
||||
cursoropacitymax?: number
|
||||
cursorcolor?: string
|
||||
cursorwidth?: string
|
||||
cursorborder?: string
|
||||
cursorborderradius?: string
|
||||
scrollspeed?: number
|
||||
mousescrollstep?: number
|
||||
touchbehavior?: boolean
|
||||
emulatetouch?: boolean
|
||||
hwacceleration?: boolean
|
||||
usetransition?: boolean
|
||||
boxzoom?: boolean
|
||||
dblclickzoom?: boolean
|
||||
gesturezoom?: boolean
|
||||
grabcursorenabled?: boolean
|
||||
autohidemode?: "leave" | "scroll" | "cursor" | "hidden" | boolean
|
||||
background?: string
|
||||
iframeautoresize?: boolean
|
||||
cursorminheight?: number
|
||||
preservenativescrolling?: boolean
|
||||
zindex?: "auto" | number;
|
||||
cursoropacitymin?: number;
|
||||
cursoropacitymax?: number;
|
||||
cursorcolor?: string;
|
||||
cursorwidth?: string;
|
||||
cursorborder?: string;
|
||||
cursorborderradius?: string;
|
||||
scrollspeed?: number;
|
||||
mousescrollstep?: number;
|
||||
touchbehavior?: boolean;
|
||||
emulatetouch?: boolean;
|
||||
hwacceleration?: boolean;
|
||||
usetransition?: boolean;
|
||||
boxzoom?: boolean;
|
||||
dblclickzoom?: boolean;
|
||||
gesturezoom?: boolean;
|
||||
grabcursorenabled?: boolean;
|
||||
autohidemode?: "leave" | "scroll" | "cursor" | "hidden" | boolean;
|
||||
background?: string;
|
||||
iframeautoresize?: boolean;
|
||||
cursorminheight?: number;
|
||||
preservenativescrolling?: boolean;
|
||||
railoffset?: boolean | {
|
||||
top?: number
|
||||
left?: number
|
||||
}
|
||||
top?: number;
|
||||
left?: number;
|
||||
};
|
||||
railhoffset?: boolean | {
|
||||
top?: number
|
||||
left?: number
|
||||
}
|
||||
bouncescroll?: boolean
|
||||
spacebarenabled?: boolean
|
||||
top?: number;
|
||||
left?: number;
|
||||
};
|
||||
bouncescroll?: boolean;
|
||||
spacebarenabled?: boolean;
|
||||
railpadding?: {
|
||||
top: number
|
||||
right: number
|
||||
left: number
|
||||
bottom: number
|
||||
}
|
||||
disableoutline?: boolean
|
||||
horizrailenabled?: boolean
|
||||
railalign?: "right" | "left" | "top" | "bottom"
|
||||
railvalign?: "right" | "left" | "top" | "bottom"
|
||||
enabletranslate3d?: boolean
|
||||
enablemousewheel?: boolean
|
||||
enablekeyboard?: boolean
|
||||
smoothscroll?: boolean
|
||||
sensitiverail?: boolean
|
||||
enablemouselockapi?: boolean
|
||||
cursorfixedheight?: number
|
||||
directionlockdeadzone?: number
|
||||
hidecursordelay?: number
|
||||
nativeparentscrolling?: boolean
|
||||
enablescrollonselection?: boolean
|
||||
overflowx?: "auto" | "hidden" | "inherit" | "initial" | "overlay" | "scroll" | "unset" | "visible"
|
||||
overflowy?: "auto" | "hidden" | "inherit" | "initial" | "overlay" | "scroll" | "unset" | "visible"
|
||||
cursordragspeed?: number
|
||||
rtlmode?: "auto" | boolean
|
||||
cursordragontouch?: boolean
|
||||
oneaxismousemode?: "auto" | boolean
|
||||
scriptpath?: string
|
||||
preventmultitouchscrolling?: boolean
|
||||
disablemutationobserver?: boolean
|
||||
enableobserver?: boolean
|
||||
scrollbarid?: string
|
||||
scrollCLass?: string
|
||||
}
|
||||
top: number;
|
||||
right: number;
|
||||
left: number;
|
||||
bottom: number;
|
||||
};
|
||||
disableoutline?: boolean;
|
||||
horizrailenabled?: boolean;
|
||||
railalign?: "right" | "left" | "top" | "bottom";
|
||||
railvalign?: "right" | "left" | "top" | "bottom";
|
||||
enabletranslate3d?: boolean;
|
||||
enablemousewheel?: boolean;
|
||||
enablekeyboard?: boolean;
|
||||
smoothscroll?: boolean;
|
||||
sensitiverail?: boolean;
|
||||
enablemouselockapi?: boolean;
|
||||
cursorfixedheight?: number;
|
||||
directionlockdeadzone?: number;
|
||||
hidecursordelay?: number;
|
||||
nativeparentscrolling?: boolean;
|
||||
enablescrollonselection?: boolean;
|
||||
overflowx?: "auto" | "hidden" | "inherit" | "initial" | "overlay" | "scroll" | "unset" | "visible";
|
||||
overflowy?: "auto" | "hidden" | "inherit" | "initial" | "overlay" | "scroll" | "unset" | "visible";
|
||||
cursordragspeed?: number;
|
||||
rtlmode?: "auto" | boolean;
|
||||
cursordragontouch?: boolean;
|
||||
oneaxismousemode?: "auto" | boolean;
|
||||
scriptpath?: string;
|
||||
preventmultitouchscrolling?: boolean;
|
||||
disablemutationobserver?: boolean;
|
||||
enableobserver?: boolean;
|
||||
scrollbarid?: string;
|
||||
scrollCLass?: string;
|
||||
}
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
niceScroll(options?: JQueryNiceScroll.NiceScrollOptions) : JQueryNiceScroll.NiceScroll;
|
||||
niceScroll(wrapper: string, options: JQueryNiceScroll.NiceScrollOptions) : JQueryNiceScroll.NiceScroll;
|
||||
getNiceScroll(index?: number) : JQueryNiceScroll.NiceScroll;
|
||||
}
|
||||
niceScroll(options?: JQueryNiceScroll.NiceScrollOptions): JQueryNiceScroll.NiceScroll;
|
||||
niceScroll(wrapper: string, options: JQueryNiceScroll.NiceScrollOptions): JQueryNiceScroll.NiceScroll;
|
||||
getNiceScroll(index?: number): JQueryNiceScroll.NiceScroll;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
//cases from documentation
|
||||
// cases from documentation
|
||||
// 1. Simple mode, it styles document scrollbar:
|
||||
$(function() {
|
||||
$(() => {
|
||||
$("body").niceScroll();
|
||||
});
|
||||
|
||||
// 2. Instance with object returned:
|
||||
let nice;
|
||||
$(function() {
|
||||
$(() => {
|
||||
nice = $("body").niceScroll();
|
||||
});
|
||||
|
||||
// 3. Style a DIV and change cursor color:
|
||||
$(function() {
|
||||
$("#thisdiv").niceScroll({cursorcolor:"#00F"});
|
||||
$(() => {
|
||||
$("#thisdiv").niceScroll({cursorcolor: "#00F"});
|
||||
});
|
||||
|
||||
// 4. DIV with "wrapper", formed by two divs, the first is the vieport, the latter is the content:
|
||||
$(function() {
|
||||
$("#viewportdiv").niceScroll("#wrapperdiv",{cursorcolor:"#00F"});
|
||||
$(() => {
|
||||
$("#viewportdiv").niceScroll("#wrapperdiv", {cursorcolor: "#00F"});
|
||||
});
|
||||
|
||||
// 5. Get nicescroll object:
|
||||
@@ -33,9 +33,9 @@ $("#mydiv").getNiceScroll().resize();
|
||||
$("#mydiv").getNiceScroll(0).doScrollLeft(1, 2); // Scroll X Axis
|
||||
$("#mydiv").getNiceScroll(0).doScrollTop(1, 14); // Scroll Y Axis
|
||||
|
||||
//other cases
|
||||
// other cases
|
||||
$(".ui-grid-viewport").niceScroll({
|
||||
cursorcolor: "#fff",
|
||||
cursorwidth: "8px",
|
||||
autohidemode: "leave"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
}
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user