Skip to content

Commit

Permalink
Use EmberShepherdStepOptions for steps (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner authored Nov 26, 2024
1 parent 510c207 commit 4be0666
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ember-shepherd/src/services/tour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { type StepOptions, type Tour } from 'shepherd.js';
import { type EmberShepherdButton, makeButton } from '../utils/buttons.ts';
import { elementIsHidden } from '../utils/dom.ts';

interface EmberShepherdStepOptions extends Omit<StepOptions, 'buttons'> {
buttons?: Array<EmberShepherdButton>;
}

/**
* Interaction with `ember-shepherd` is done entirely through the Tour service, which you can access from any object using the `service` syntax:
*
Expand Down Expand Up @@ -250,9 +254,7 @@ export default class TourService extends Service.extend(Evented) {
* @returns {Promise} Promise that resolves when everything has been set up and shepherd is ready to use
* @public
*/
addSteps(
steps: Array<StepOptions & { buttons: Array<EmberShepherdButton> }>,
) {
addSteps(steps: Array<EmberShepherdStepOptions>) {
return this._initialize().then(() => {
const tour = this.tourObject;

Expand Down

0 comments on commit 4be0666

Please sign in to comment.