<commit_before>import Vue from 'vue';
import { Messages } from '../i18n/i18n';
import { HttpService } from '../http/http';
import { MediaQueries } from '../media-queries/media-queries';
import { MWindow } from '../m-window/m-window';

export class ModulVue extends Vue {
    public $i18n: Messages;
    public $http: HttpService;
    public $mq: MediaQueries;
    public $mWindow: MWindow;
}<commit_msg>Added getParent for ModulVue classes<commit_after>import Vue from 'vue';
import { Messages } from '../i18n/i18n';
import { HttpService } from '../http/http';
import { MediaQueries } from '../media-queries/media-queries';
import { MWindow } from '../m-window/m-window';

export class ModulVue extends Vue {
    public $i18n: Messages;
    public $http: HttpService;
    public $mq: MediaQueries;
    public $mWindow: MWindow;

    protected getParent<T extends Vue>(test: (obj: Vue) => boolean): T | undefined {
        let p: Vue = this.$parent;
        while (p && !test(p)) {
            p = p.$parent;
        }
        return p as any;
    }
}
{'fraction_non_alphanumeric': 0.1457142857142857, 'fraction_numerical': 0.011428571428571429, 'mean_word_length': 3.0894941634241246, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4699155', 'n_tokens_mistral': 351, 'n_tokens_neox': 342, 'n_words': 100}