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: fix.rs
    path of file: ./repos/stc/crates/stc_ts_base_type_ops/src
    
    the code of the file until where you have to start completion: use rnode::{VisitMut, VisitMutWith};
use stc_ts_types::{Array, Conditional, FnParam, Intersection, KeywordTypeMetadata, Type, TypeOrSpread, TypeParam, Union, Valid};
use swc_common::TypeEq;

pub trait Fix: Sized {
    fn fix(&mut self);

    fn fixed(mut self) -> Self {
        self.fix();
        self
    }
}

impl<T> Fix for Vec<T>
where
    T: Fix,
{
    fn fix(&mut self) {
        self.iter_mut().for_each(|item| item.fix())
    }
}

impl<T> Fix for Option<T>
where
    T: Fix,
{
    fn fix(&mut self) {
        match self {
            Some(v) => v.fix(),
            None => {}
        }
    }
}

impl<T> Fix for Box<T>
where
    T: Fix,
{
    fn fix(&mut self) {
        (**self).fix()
    }
}

macro_rules! im
    
    fn fix_type(&mut self, ty: &mut Type) {
        if matches!(ty, Type::Arc(..)) {
            return;
        }

        if matches!(ty, Type::Keyword(..) | Type::Lit(..)) {
            return;
        }

        if ty.is_valid() {
            return;
        }

        ty.normalize_mut();
        ty.visit_mut_children_with(self);

        match ty {
            Type::Union(u) => match u.types.len() {
                0 => {
                    *ty = Type::never(
                        u.span,
                        KeywordTypeMetadata {
                            common: u.metadata.common,
                            ..Default::default()
                        },
                    );
                }
                1 => {
                    let mut elem = u.types.drain(..).next().unwrap();
                    elem.respan(u.span);
                    *ty = elem;
                }
                _ => {}
            },

            Type::Intersection(i) => match i.types.len() {
                0 => {
                    *ty = Type::any(
                        i.span,
                        KeywordTypeMetadata {
                            common: i.metadata.common,
                            ..Default::default()
                        },
                    );
                }
                1 => {
                    let mut elem = i.types.drain(..).next().unwrap();
                    elem.respan(i.span);
                    *ty = elem;
                }
                _ => {}
            },
            _ => {}
        }
    }