Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Native Typescript Declarations #375

Merged
merged 10 commits into from
Jun 20, 2024
3 changes: 1 addition & 2 deletions dev/serve.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<script setup>
import ShepherdExample from './components/ShepherdExample.vue';
import 'shepherd.js/dist/css/shepherd.css';
</script>

<template>
<shepherd-example />
</template>

<style>
@import '~shepherd.js/dist/css/shepherd.css';

#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
Expand Down
13 changes: 13 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Tour, TourOptions } from 'shepherd.js/tour';
import { ObjectPlugin } from 'vue';

declare module 'vue-shepherd' {
export function useShepherd(...args: Array<TourOptions>): Tour;
export default ObjectPlugin;
}

declare module 'vue' {
interface ComponentCustomProperties {
$shepherd: (...args: Array<TourOptions>) => Tour;
}
}
Loading
Loading