wikimedia/mediawiki-extensions-Wikibase

View on GitHub
view/lib/wikibase-tainted-ref/src/vue-plugins/Track.ts

Summary

Maintainability
A
0 mins
Test Coverage
import TrackingOptions from '@/@types/TrackingOptions';
import { App } from 'vue';

export default function Track(
    app: App,
    options: TrackingOptions,
): void {
    app.config.globalProperties.$track = ( topic: string, data: string | number | object ) => {
        options.trackingFunction( topic, data );
    };
}