From 8b5b8b65da3ccc6c418033b2e37d05fd76dde385 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 Sep 2015 15:04:37 +0200 Subject: [PATCH] updated definitions to include more typing --- tooltipster/tooltipster-tests.ts | 2 +- tooltipster/tooltipster.d.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tooltipster/tooltipster-tests.ts b/tooltipster/tooltipster-tests.ts index 5ca867ec1..0af2cf4f3 100644 --- a/tooltipster/tooltipster-tests.ts +++ b/tooltipster/tooltipster-tests.ts @@ -1,7 +1,7 @@ /// $(function() { - const tooltips = $("#tooltip").tooltipster({ + var tooltips = $("#tooltip").tooltipster({ content: "hi friend!", delay: 300, functionAfter: (origin) => { diff --git a/tooltipster/tooltipster.d.ts b/tooltipster/tooltipster.d.ts index ec1529570..7afa46ddb 100644 --- a/tooltipster/tooltipster.d.ts +++ b/tooltipster/tooltipster.d.ts @@ -74,27 +74,27 @@ declare module JQueryTooltipster { * @param origin * @param content */ - functionInit?: (origin, content) => void; + functionInit?: (origin: JQuery, content: string) => void; /** * Create a custom function to be fired before the tooltip opens. This function may prevent or hold off the opening. * @param origin * @param continueTooltip */ - functionBefore?: (origin, continueTooltip) => void; + functionBefore?: (origin: JQuery, continueTooltip: () => void) => void; /** * Create a custom function to be fired when the tooltip and its contents have been added to the DOM. * @param origin * @param tooltip */ - functionReady?: (origin, tooltip) => void; + functionReady?: (origin: JQuery, tooltip: JQuery) => void; /** * Create a custom function to be fired once the tooltip has been closed and removed from the DOM. * @param origin */ - functionAfter?: (origin) => void; + functionAfter?: (origin: JQuery) => void; /** * If true, the tooltip will close if its origin is clicked. This option only applies when 'trigger' is 'hover' and 'autoClose' is false. Default: false @@ -228,7 +228,7 @@ declare module JQueryTooltipster { * @param value * @returns {} */ - content(value: string); + content(value: string): JQuery; /** * Shows the tooltip.