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: raw_resolve.rs
    path of file: ./repos/rspack/crates/rspack_binding_options/src/options
    
    the code of the file until where you have to start completion: use std::{collections::HashMap, path::PathBuf};

use napi_derive::napi;
use rspack_core::{Alias, AliasMap, ByDependency, Resolve, TsconfigOptions, TsconfigReferences};
use rspack_error::error;
use serde::Deserialize;

pub type AliasValue = serde_json::Value;

#[derive(Deserialize, Debug)]
#[napi(object)]
pub struct RawAliasOptionItem {
  pub path: String,
  #[napi(ts_type = "Array<string | false>")]
  pub redirect: Vec<AliasValue>,
}

#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
#[napi(object)]
pub struct RawResolveTsconfigOptions {
  pub config_file: String,
  #[napi(ts_type = r#""auto" | "manual" | "disabled""#)]
  pub references_type: String,
  pub references: Option<Vec<String>>,
}

#[derive(Deserial
    
fn normalize_alias(alias: Option<Vec<RawAliasOptionItem>>) -> rspack_error::Result<Option<Alias>> {
  alias
    .map(|alias| {
      alias
        .into_iter()
        .map(|alias_item| {
          alias_item
            .redirect
            .into_iter()
            .map(|value| {
              if let Some(s) = value.as_str() {
                Ok(AliasMap::Path(s.to_string()))
              } else if let Some(b) = value.as_bool() {
                if b {
                  Err(error!("Alias should not be true in {}", alias_item.path))
                } else {
                  Ok(AliasMap::Ignore)
                }
              } else {
                Err(error!(
                  "Alias should be false or string in {}",
                  alias_item.path
                ))
              }
            })
            .collect::<rspack_error::Result<_>>()
            .map(|value| (alias_item.path, value))
        })
        .collect::<rspack_error::Result<_>>()
    })
    .map_or(Ok(None), |v| v.map(Some))
}