Skip to content

Commit e77c3a8

Browse files
stijnie2210adriaandotcom
authored andcommitted
added types
1 parent ed03815 commit e77c3a8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dist/index.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { App, Plugin } from 'vue'
1+
import type { App, Plugin, InjectionKey } from 'vue'
22

33
declare global {
44
interface Window {
@@ -11,16 +11,17 @@ export interface SimpleAnalyticsOptions {
1111
domain?: string;
1212
}
1313

14+
export declare const saEventKey: InjectionKey<(event: string) => void>;
15+
1416
type SimpleAnalyticsPlugin = Plugin & {
1517
install(app: App, options?: SimpleAnalyticsOptions): void;
1618
}
1719

1820
declare const SimpleAnalytics: SimpleAnalyticsPlugin;
19-
2021
export default SimpleAnalytics;
2122

2223
declare module '@vue/runtime-core' {
23-
interface ComponentCustomProperties {
24-
$saEvent?: (event: string) => void;
24+
interface InjectionKeys {
25+
saEvent: (event: string) => void;
2526
}
2627
}

0 commit comments

Comments
 (0)