11declare  module 'intro.js-react'  { 
2+   import  *  as  React  from  'react' ; 
3+   import  {  IntroJs ,  Options  }  from  'intro.js' ; 
4+ 
25  interface  Step  { 
36    /** 
47     * CSS selector to use for the step. 
@@ -7,7 +10,7 @@ declare module 'intro.js-react' {
710    /** 
811     * The tooltip content. 
912     */ 
10-     intro : string  |  JSX . Element ; 
13+     intro : string  |  React . ReactNode ; 
1114    /** 
1215     * Position of the tooltip. 
1316     */ 
@@ -34,106 +37,7 @@ declare module 'intro.js-react' {
3437    /** 
3538     * Position of the tooltip. 
3639     */ 
37-     hintPosition ?: String ; 
38-   } 
39- 
40-   interface  Options  { 
41-     /** 
42-      * Next button label. 
43-      */ 
44-     nextLabel ?: string ; 
45-     /** 
46-      * Previous button label. 
47-      */ 
48-     prevLabel ?: string ; 
49-     /** 
50-      * Skip button label. 
51-      */ 
52-     skipLabel ?: string ; 
53-     /** 
54-      * Done button label. 
55-      */ 
56-     doneLabel ?: string ; 
57-     /** 
58-      * Hides the Previous button in the first step. 
59-      */ 
60-     hidePrev ?: boolean ; 
61-     /** 
62-      * Hide the Next button in the last step. 
63-      */ 
64-     hideNext ?: boolean ; 
65-     /** 
66-      * Position of the tooltips. 
67-      */ 
68-     tooltipPosition ?: string ; 
69-     /** 
70-      * CSS class of the tooltips. 
71-      */ 
72-     tooltipClass ?: string ; 
73-     /** 
74-      * CSS class of the helperLayer. 
75-      */ 
76-     highlightClass ?: string ; 
77-     /** 
78-      * Exit by pressing Escape. 
79-      */ 
80-     exitOnEsc ?: boolean ; 
81-     /** 
82-      * Exit by clicking on the overlay layer. 
83-      */ 
84-     exitOnOverlayClick ?: boolean ; 
85-     /** 
86-      * Show steps number in a red circle. 
87-      */ 
88-     showStepNumbers ?: boolean ; 
89-     /** 
90-      * Allows navigation between steps using the keyboard. 
91-      */ 
92-     keyboardNavigation ?: boolean ; 
93-     /** 
94-      * Show navigation buttons. 
95-      */ 
96-     showButtons ?: boolean ; 
97-     /** 
98-      * Show bullets. 
99-      */ 
100-     showBullets ?: boolean ; 
101-     /** 
102-      * Show progress indicator. 
103-      */ 
104-     showProgress ?: boolean ; 
105-     /** 
106-      * Enables scrolling to hidden elements. 
107-      */ 
108-     scrollToElement ?: boolean ; 
109-     /** 
110-      * Opacity of the overlay. 
111-      */ 
112-     overlayOpacity ?: number ; 
113-     /** 
114-      * Padding when automatically scrolling to an element. 
115-      */ 
116-     scrollPadding ?: number ; 
117-     /** 
118-      * Precedence of positions. 
119-      */ 
120-     positionPrecedence ?: string [ ] ; 
121-     /** 
122-      * Disables interaction inside elements. 
123-      */ 
124-     disableInteraction ?: boolean ; 
125-     /** 
126-      * Position of the hints. 
127-      */ 
12840    hintPosition ?: string ; 
129-     /** 
130-      * 	Hint button label. 
131-      */ 
132-     hintButtonLabel ?: string ; 
133-     /** 
134-      * Enables hint animations. 
135-      */ 
136-     hintAnimation ?: boolean ; 
13741  } 
13842
13943  interface  StepsProps  { 
@@ -151,42 +55,44 @@ declare module 'intro.js-react' {
15155     */ 
15256    steps : Step [ ] ; 
15357    /** 
154-      * Callback called when the steps are disabled 
155-      * Required to force keeping track of the state when the steps are dismissed with an Intro.js event and not the enabled prop. 
58+      * Callback called when the steps are disabled. 
59+      * Required to force keeping track of the state when the steps are dismissed with an Intro.js event and not the 
60+      * enabled prop. 
15661     */ 
157-     onExit ( stepIndex : number ) : any ; 
62+     onExit ( stepIndex : number ) : void ; 
15863    /** 
15964     * Callback called before exiting the intro. 
16065     * If you want to prevent exiting the intro, you can return false in this callback (available since intro.js 0.2.7). 
16166     */ 
162-     onBeforeExit ?( stepIndex : number ) : any ; 
67+     onBeforeExit ?( stepIndex : number ) : void   |   false ; 
16368    /** 
16469     * Callback called when the steps are enabled. 
16570     */ 
166-     onStart ?( stepIndex : number ) : any ; 
71+     onStart ?( stepIndex : number ) : void ; 
16772    /** 
16873     * Callback called when the current step is changed. 
16974     */ 
170-     onChange ?( nextStepIndex : number ,  nextElement : Element ) : any ; 
75+     onChange ?( nextStepIndex : number ,  nextElement : Element ) : void ; 
17176    /** 
17277     * Callback called before changing the current step. 
173-      * If you want to prevent the transition to the next / previous step, you can return false in this callback (available since intro.js 2.8.0). 
78+      * If you want to prevent the transition to the next / previous step, you can return false in this callback 
79+      * (available since intro.js 2.8.0). 
17480     */ 
175-     onBeforeChange ?( nextStepIndex : number ) : any ; 
81+     onBeforeChange ?( nextStepIndex : number ) : void   |   false ; 
17682    /** 
17783     * Callback called after changing the current step. 
17884     */ 
179-     onAfterChange ?( newStepIndex : number ,  newElement : Element ) : any ; 
85+     onAfterChange ?( newStepIndex : number ,  newElement : Element ) : void ; 
18086    /** 
18187     * Callback called if you prevented transitioning to a new step by returning false in onBeforeChange. 
18288     */ 
183-     onPreventChange ?( stepIndex : number ) : any ; 
89+     onPreventChange ?( stepIndex : number ) : void ; 
18490    /** 
18591     * Callback called when all the steps are completed. 
18692     */ 
187-     onComplete ?( ) : any ; 
93+     onComplete ?( ) : void ; 
18894    /** 
189-      * Intro.js options.”  
95+      * Intro.js options. 
19096     */ 
19197    options ?: Options ; 
19298  } 
@@ -198,23 +104,26 @@ declare module 'intro.js-react' {
198104     */ 
199105    enabled ?: boolean ; 
200106    /** 
201-      * All the hints.	Hint[]  
107+      * All the hints. 
202108     */ 
203109    hints : Hint [ ] ; 
204110    /** 
205111     * Callback called when a hint is clicked. 
206112     */ 
207-     onClick ?( ) : any ; 
113+     onClick ?( ) : void ; 
208114    /** 
209115     * Callback called when a hint is closed. 
210116     */ 
211-     onClose ?( ) : any ; 
117+     onClose ?( ) : void ; 
212118    /** 
213119     * Intro.js options. 
214120     */ 
215121    options ?: Options ; 
216122  } 
217123
218-   function  Steps ( props : StepsProps ) : JSX . Element ; 
219-   function  Hints ( props : HintsProps ) : JSX . Element ; 
124+   export  class  Steps  extends  React . Component < StepsProps >  { 
125+     introJs : IntroJs ; 
126+   } 
127+ 
128+   export  class  Hints  extends  React . Component < HintsProps >  { } 
220129} 
0 commit comments