4593eb9115
It is needed if we use the noImplicitAny switch in the tsconfig.json file. Otherwise the typescript compiler won't compile it. Error messages caused by lack of explicit return types: node_modules/perfect-scrollbar/perfect-scrollbar.d.ts(16,3): error TS7010: 'initialize', which lacks return-type annotation, implicitly has an 'any' return type. node_modules/perfect-scrollbar/perfect-scrollbar.d.ts(17,3): error TS7010: 'update', which lacks return-type annotation, implicitly has an 'any' return type. node_modules/perfect-scrollbar/perfect-scrollbar.d.ts(18,3): error TS7010: 'destroy', which lacks return-type annotation, implicitly has an 'any' return type.
30 lines
727 B
TypeScript
30 lines
727 B
TypeScript
interface PerfectScrollbarOptions {
|
|
wheelSpeed?: number;
|
|
wheelPropagation?: boolean;
|
|
swipePropagation?: boolean;
|
|
minScrollbarLength?: number;
|
|
maxScrollbarLength?: number;
|
|
useBothWheelAxes?: boolean;
|
|
useKeyboard?: boolean;
|
|
suppressScrollX?: boolean;
|
|
suppressScrollY?: boolean;
|
|
scrollXMarginOffset?: number;
|
|
scrollYMarginOffset?: number;
|
|
}
|
|
|
|
interface PerfectScrollbar {
|
|
initialize(container: HTMLElement, options?: PerfectScrollbarOptions): void;
|
|
update(container: HTMLElement): void;
|
|
destroy(container: HTMLElement): void;
|
|
}
|
|
|
|
interface JQuery {
|
|
perfectScrollbar(options?: PerfectScrollbarOptions): JQuery;
|
|
}
|
|
|
|
declare var ps: PerfectScrollbar;
|
|
|
|
declare module "perfect-scrollbar" {
|
|
export = ps;
|
|
}
|