-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add basic typescript module declaration
Thanks to @losfroger and @jim-toth in the related issue. This implementation was a merge of their recommended fixes and the official Vue 3 Options API Type Augmentation documentation. I've tested the module definitions against a real-world Vue 3 codebase in both Composition and Options API mode. Closes #15.
- Loading branch information
1 parent
f5bb39e
commit 68d5233
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Shepherd from 'shepherd.js'; | ||
import { ObjectPlugin } from 'vue'; | ||
|
||
declare module 'vue-shepherd' { | ||
export function useShepherd(...args: Array<Shepherd.Tour.TourOptions>): Shepherd.Tour; | ||
export default ObjectPlugin; | ||
} | ||
|
||
declare module 'vue' { | ||
interface ComponentCustomProperties { | ||
$shepherd: (...args: Array<Shepherd.Tour.TourOptions>) => Shepherd.Tour; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters