wikimedia/mediawiki-extensions-Wikibase

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

Summary

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

export default function Message(
    app: App,
    options: MessageOptions,
): void {
    app.config.globalProperties.$message = ( key: string ): string => {
        return options.messageToTextFunction( key );
    };
}