mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-08 09:17:06 +08:00
🐞 Fix issue with use of Function type
This commit is contained in:
39
types/owl.carousel/index.d.ts
vendored
39
types/owl.carousel/index.d.ts
vendored
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/OwlCarousel2/OwlCarousel2
|
||||
// Definitions by: Ismael Gorissen <https://github.com/igorissen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="jquery"/>
|
||||
|
||||
@@ -51,7 +52,7 @@ declare namespace OwlCarousel {
|
||||
animateOut?: string | boolean;
|
||||
animateIn?: string | boolean;
|
||||
fallbackEasing?: string;
|
||||
info?: Function;
|
||||
info?: HandlerCallback;
|
||||
nestedItemSelector?: string;
|
||||
itemElement?: string;
|
||||
stageElement?: string;
|
||||
@@ -74,24 +75,26 @@ declare namespace OwlCarousel {
|
||||
autoHeightClass?: string;
|
||||
responsiveClass?: string | boolean;
|
||||
// EVENTS
|
||||
onInitialize?: Function;
|
||||
onInitialized?: Function;
|
||||
onResize?: Function;
|
||||
onResized?: Function;
|
||||
onRefresh?: Function;
|
||||
onRefreshed?: Function;
|
||||
onDrag?: Function;
|
||||
onDragged?: Function;
|
||||
onTranslate?: Function;
|
||||
onTranslated?: Function;
|
||||
onChange?: Function;
|
||||
onChanged?: Function;
|
||||
onLoadLazy?: Function;
|
||||
onLoadedLazy?: Function;
|
||||
onStopVideo?: Function;
|
||||
onPlayVideo?: Function;
|
||||
onInitialize?: HandlerCallback;
|
||||
onInitialized?: HandlerCallback;
|
||||
onResize?: HandlerCallback;
|
||||
onResized?: HandlerCallback;
|
||||
onRefresh?: HandlerCallback;
|
||||
onRefreshed?: HandlerCallback;
|
||||
onDrag?: HandlerCallback;
|
||||
onDragged?: HandlerCallback;
|
||||
onTranslate?: HandlerCallback;
|
||||
onTranslated?: HandlerCallback;
|
||||
onChange?: HandlerCallback;
|
||||
onChanged?: HandlerCallback;
|
||||
onLoadLazy?: HandlerCallback;
|
||||
onLoadedLazy?: HandlerCallback;
|
||||
onStopVideo?: HandlerCallback;
|
||||
onPlayVideo?: HandlerCallback;
|
||||
}
|
||||
|
||||
type HandlerCallback = (...args: any[]) => void;
|
||||
|
||||
type OnEvent = 'initialize.owl.carousel'
|
||||
| 'initialized.owl.carousel'
|
||||
| 'resize.owl.carousel'
|
||||
@@ -124,7 +127,7 @@ declare namespace OwlCarousel {
|
||||
interface JQuery {
|
||||
owlCarousel(options?: OwlCarousel.Options | 'destroy'): JQuery;
|
||||
|
||||
on(event: OwlCarousel.OnEvent, handler: (...args: any[]) => void): JQuery;
|
||||
on(event: OwlCarousel.OnEvent, handler: OwlCarousel.HandlerCallback): JQuery;
|
||||
|
||||
trigger(event: OwlCarousel.TriggerEvent): JQuery;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user