We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b1ee8c8 + 03492d7 commit bb0eeb8Copy full SHA for bb0eeb8
CHANGELOG.md
@@ -1,3 +1,7 @@
1
+## Unreleased
2
+
3
+* Update TypeScript `onBeforeChange` return type to support promises.
4
5
## 0.7.0
6
7
* Add missing TypeScript `title` attribute type to steps.
index.d.ts
@@ -82,7 +82,7 @@ declare module 'intro.js-react' {
82
* If you want to prevent the transition to the next / previous step, you can return false in this callback
83
* (available since intro.js 2.8.0).
84
*/
85
- onBeforeChange?(nextStepIndex: number, nextElement: Element): void | false;
+ onBeforeChange?(nextStepIndex: number, nextElement: Element): void | false | Promise<void | false>;
86
/**
87
* Callback called after changing the current step.
88
0 commit comments