You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ts_babel.rs
    path of file: ./repos/biome/xtask/coverage/src/ts
    
    the code of the file until where you have to start completion: use crate::runner::create_bogus_node_in_tree_diagnostic;
use crate::{
    check_file_encoding,
    runner::{TestCase, TestCaseFiles, TestRunOutcome, TestSuite},
};
use biome_js_parser::JsParserOptions;
use biome_js_syntax::{JsFileSource, LanguageVariant};
use biome_rowan::SyntaxKind;
use std::path::Path;

const CASES_PATH: &str = "xtask/coverage/babel/packages/babel-parser/test/fixtures/typescript";

struct BabelTypescriptTestCase {
    name: String,
    expected_to_fail: bool,
    code: String,
    variant: LanguageVariant,
}

impl BabelTypescriptTestCase {
    fn new(path: &Path, code: String, expected_to_fail: bool, variant: LanguageVariant) -> Self {
        let name = path
            .parent()
            .unwrap()
            .strip_prefix(CASES_PATH)
            .unwrap()
            .display()
            .to_string();

        Self {
            name,
            code,
            expected_to_fail,
            variant,
        }
    }
}

impl TestCase for BabelTypescriptTestCase {
    fn
    
    fn run(&self) -> TestRunOutcome {
        let source_type = JsFileSource::ts().with_variant(self.variant);
        let options = JsParserOptions::default().with_parse_class_parameter_decorators();
        let files = TestCaseFiles::single(
            self.name().to_string(),
            self.code.clone(),
            source_type,
            options.clone(),
        );

        let result = biome_js_parser::parse(&self.code, source_type, options);

        if self.expected_to_fail && result.diagnostics().is_empty() {
            TestRunOutcome::IncorrectlyPassed(files)
        } else if self.expected_to_fail {
            TestRunOutcome::Passed(files)
        } else if !result.diagnostics().is_empty() {
            TestRunOutcome::IncorrectlyErrored {
                files,
                errors: result.diagnostics().to_vec(),
            }
        } else if let Some(bogus) = result
            .syntax()
            .descendants()
            .find(|descendant| descendant.kind().is_bogus())
        {
            TestRunOutcome::IncorrectlyErrored {
                files,
                errors: vec![create_bogus_node_in_tree_diagnostic(bogus)],
            }
        } else {
            TestRunOutcome::Passed(files)
        }
    }