<commit_before>import {DeclarationType} from "../../models/declaration-type";
import {Metakeys} from "../../models/metakeys";
import {replaceTwoWayBindings} from "./helpers";

export function Component(config?: {selector?: string, template?: string}): ClassDecorator {
    return function (target: any) {
        if (config) {
            if (config.template) {
                target.template = config.template;
            }

            if (config.selector) {
                target.selector = config.selector;
            }
        }

        // Lifecycle hooks aliases
        if (target.prototype.ngOnInit) {
            target.prototype.$onInit = target.prototype.ngOnInit;
        }

        if (target.prototype.ngAfterViewInit) {<commit_msg>add styles type for compatibility<commit_after>import {DeclarationType} from "../../models/declaration-type";
import {Metakeys} from "../../models/metakeys";
import {replaceTwoWayBindings} from "./helpers";

interface ComponentConfig {
    selector?: string;
    template?: string;
    styles?: Array<any>; // added for compatibility with Angular12 with ngUpgrade
}

export function Component(config?: ComponentConfig): ClassDecorator {
    return function (target: any) {
        if (config) {
            if (config.template) {
                target.template = config.template;
            }

            if (config.selector) {
                target.selector = config.selector;
            }
        }

        // Lifecycle hooks aliases
        if (target.prototype.ngOnInit) {
            target.prototype.$onInit = target.prototype.ngOnInit;
        }

        if (target.prototype.ngAfterViewInit) {
{'fraction_non_alphanumeric': 0.11821471652593486, 'fraction_numerical': 0.0012062726176115801, 'mean_word_length': 2.2465753424657535, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3202664', 'n_tokens_mistral': 437, 'n_tokens_neox': 426, 'n_words': 102}