[][src]Function dprint_plugin_typescript::configuration::resolve_config

pub fn resolve_config(
    config: ConfigKeyMap,
    global_config: &GlobalConfiguration
) -> ResolveConfigurationResult<Configuration>

Resolves configuration from a collection of key value strings.

Example

use std::collections::HashMap;
use dprint_core::configuration::{resolve_global_config};
use dprint_plugin_typescript::configuration::{resolve_config};

let config_map = HashMap::new(); // get a collection of key value pairs from somewhere
let global_config_result = resolve_global_config(config_map);

// check global_config_result.diagnostics here...

let typescript_config_map = HashMap::new(); // get a collection of k/v pairs from somewhere
let config_result = resolve_config(
    typescript_config_map,
    &global_config_result.config
);

// check config_result.diagnostics here and use config_result.config