Skip to content

Commit 3bf4404

Browse files
Fix TS and tests
1 parent f9f18c7 commit 3bf4404

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ at the app level ensures you only create one instance of Shepherd.**
6262
In that component you will want to use `AfterViewInit` to `addSteps` to the Shepherd service.
6363

6464
```typescript
65-
import { Component, AfterViewInit } from '@angular/core';
65+
import { Component, type AfterViewInit } from '@angular/core';
6666
import { ShepherdService } from 'angular-shepherd';
6767
import { steps as defaultSteps, defaultStepOptions} from '../data';
6868

projects/shepherd-tester/src/app/shepherd/shepherd.component.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import { Component, AfterViewInit } from '@angular/core';
1+
import { Component, type AfterViewInit } from '@angular/core';
22
import { ShepherdService } from '../../../../shepherd/src/lib/shepherd.service';
3-
import { steps as defaultSteps, defaultStepOptions} from '../data';
3+
import { steps as defaultSteps, defaultStepOptions } from '../data';
44

55
@Component({
66
selector: 'app-shepherd',
77
templateUrl: './shepherd.component.html',
88
styleUrls: ['./shepherd.component.css'],
9-
standalone: true,
9+
standalone: true
1010
})
1111
export class ShepherdComponent implements AfterViewInit {
12-
13-
constructor(private shepherdService: ShepherdService) { }
12+
constructor(private shepherdService: ShepherdService) {}
1413

1514
ngAfterViewInit() {
1615
this.shepherdService.defaultStepOptions = defaultStepOptions;

projects/shepherd/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ at the app level ensures you only create one instance of Shepherd.**
5959
In that component you will want to use `AfterViewInit` to `addSteps` to the Shepherd service.
6060

6161
```typescript
62-
import { Component, AfterViewInit } from '@angular/core';
62+
import { Component, type AfterViewInit } from '@angular/core';
6363
import { ShepherdService } from 'angular-shepherd';
6464
import { steps as defaultSteps, defaultStepOptions} from '../data';
6565

projects/shepherd/src/lib/shepherd.service.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { Injectable } from '@angular/core';
2-
import { Tour, type TourOptions, type StepOptions } from 'shepherd.js';
2+
import Shepherd, {
3+
type TourOptions,
4+
type StepOptions,
5+
type Tour
6+
} from 'shepherd.js';
37
import { elementIsHidden } from './utils/dom';
48
import { makeButton } from './utils/buttons';
59

@@ -151,7 +155,7 @@ export class ShepherdService {
151155
* Initializes the tour, creates a new Shepherd.Tour. sets options, and binds events
152156
*/
153157
private _initialize() {
154-
const tourObject = new Tour({
158+
const tourObject = new Shepherd.Tour({
155159
confirmCancel: this.confirmCancel,
156160
confirmCancelMessage: this.confirmCancelMessage,
157161
defaultStepOptions: this.defaultStepOptions,
@@ -164,6 +168,6 @@ export class ShepherdService {
164168
tourObject.on('complete', this.onTourFinish.bind(this, 'complete'));
165169
tourObject.on('cancel', this.onTourFinish.bind(this, 'cancel'));
166170

167-
this.tourObject = tourObject as Tour;
171+
this.tourObject = tourObject;
168172
}
169173
}

tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"esModuleInterop": true,
1010
"experimentalDecorators": true,
1111
"importHelpers": true,
12-
"inlineSourceMap": true,
13-
"inlineSources": true,
1412
"lib": ["es2018", "dom"],
1513
"module": "ESNext",
1614
"moduleResolution": "bundler",
@@ -21,8 +19,6 @@
2119
// We don't want to include types dependencies in our compiled output, so tell TypeScript
2220
// to enforce using `import type` instead of `import` for Types.
2321
"verbatimModuleSyntax": true,
24-
"allowJs": true,
2522
"strict": true,
26-
"noUncheckedIndexedAccess": true
2723
}
2824
}

0 commit comments

Comments
 (0)