diff --git a/types/jquery.tooltipster/index.d.ts b/types/jquery.tooltipster/index.d.ts
index 3534730ec4..5ef4debed4 100644
--- a/types/jquery.tooltipster/index.d.ts
+++ b/types/jquery.tooltipster/index.d.ts
@@ -1,6 +1,6 @@
// Type definitions for jQuery Tooltipster 3.3.0
// Project: https://github.com/iamceege/tooltipster
-// Definitions by: Patrick Magee , Dmitry Pesterev
+// Definitions by: Patrick Magee , Dmitry Pesterev , Leonard Thieu
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///
@@ -164,25 +164,6 @@ interface JQueryTooltipsterOptions {
interface JQuery {
- /**
- * Initiate the Tooltipster plugin
- */
- tooltipster(): JQuery;
-
- /**
- * Creates a new tooltip with the specified, or default, options.
- * @param options The options
- * @example
- * $('.tooltip').tooltipster({
- * animation: 'fade',
- * delay: 200,
- * theme: 'tooltipster-default',
- * touchDevices: false,
- * trigger: 'hover'
- * });
- */
- tooltipster(options?: JQueryTooltipsterOptions): JQuery;
-
/**
* Show a tooltip (the 'callback' argument is optional)
* @param methodName show
@@ -262,11 +243,35 @@ interface JQuery {
*/
tooltipster(methodName: "elementIcon"): JQuery;
+ /**
+ * Change default options for all future instances
+ * @param methodName setDefaults
+ * @param {object} options The options that should be made defaults
+ */
+ tooltipster(methodName: 'setDefaults', options: JQueryTooltipsterOptions): JQuery;
+
/**
* Generics
*/
- tooltipster(methodName: string, optionName: string, optionValue: string): JQuery;
- tooltipster(methodName: string, param: string): JQuery;
- tooltipster(methodName: string): JQuery;
- tooltipster(methodName: string): string;
+ tooltipster(methodName: string, optionName: string, optionValue?: string): JQuery;
+ tooltipster(methodName: string): JQuery | string;
+
+ /**
+ * Creates a new tooltip with the specified, or default, options.
+ * @param options The options
+ * @example
+ * $('.tooltip').tooltipster({
+ * animation: 'fade',
+ * delay: 200,
+ * theme: 'tooltipster-default',
+ * touchDevices: false,
+ * trigger: 'hover'
+ * });
+ */
+ tooltipster(options?: JQueryTooltipsterOptions): JQuery;
+
+ /**
+ * Initiate the Tooltipster plugin
+ */
+ tooltipster(): JQuery;
}