From f8c293c4aa93682334977c1f2db5258d3eaad315 Mon Sep 17 00:00:00 2001 From: Aurimas1 <30459244+Aurimas1@users.noreply.github.com> Date: Tue, 19 Sep 2017 10:07:47 +0300 Subject: [PATCH] hopscotch small fixes, no breaking changes --- types/hopscotch/index.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/types/hopscotch/index.d.ts b/types/hopscotch/index.d.ts index ff393f27df..f590285247 100644 --- a/types/hopscotch/index.d.ts +++ b/types/hopscotch/index.d.ts @@ -1,9 +1,10 @@ // Type definitions for Hopscotch v0.2.5 // Project: http://linkedin.github.io/hopscotch/ -// Definitions by: Tim Perry +// Definitions by: Tim Perry , Aurimas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare type CallbackNameNamesOrDefinition = string | string[] | (() => void); +declare type placmentTypes = 'top' | 'bottom' | 'right' | 'left'; interface HopscotchConfiguration { bubbleWidth?: number; @@ -27,6 +28,7 @@ interface HopscotchConfiguration { onEnd?: CallbackNameNamesOrDefinition; onClose?: CallbackNameNamesOrDefinition; onError?: CallbackNameNamesOrDefinition; + onShow?: CallbackNameNamesOrDefinition; i18n?: { nextBtn?: string; @@ -44,7 +46,7 @@ interface TourDefinition extends HopscotchConfiguration { } interface StepDefinition { - placement: string; + placement: placmentTypes; target: string | HTMLElement | Array title?: string; @@ -53,9 +55,9 @@ interface StepDefinition { width?: number; padding?: number; - xOffset?: number; - yOffset?: number; - arrowOffset?: number; + xOffset?: number | 'center'; + yOffset?: number | 'center'; + arrowOffset?: number | 'center'; delay?: number; zIndex?: number;