summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/cli/main.rs b/cli/main.rs
index cf1bb4ca5..31ac4b331 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -284,23 +284,23 @@ async fn check_command(
async fn load_and_type_check(
ps: &ProcState,
- files: &Vec<String>,
+ files: &[String],
) -> Result<(), AnyError> {
let lib = ps.options.ts_type_lib_window();
- for file in files {
- let specifier = resolve_url_or_path(file)?;
-
- ps.prepare_module_load(
- vec![specifier],
- false,
- lib,
- Permissions::allow_all(),
- Permissions::allow_all(),
- false,
- )
- .await?;
- }
+ let specifiers = files
+ .iter()
+ .map(|file| resolve_url_or_path(file))
+ .collect::<Result<Vec<_>, _>>()?;
+ ps.prepare_module_load(
+ specifiers,
+ false,
+ lib,
+ Permissions::allow_all(),
+ Permissions::allow_all(),
+ false,
+ )
+ .await?;
Ok(())
}