diff options
author | Nayeem Rahman <muhammed.9939@gmail.com> | 2020-02-11 09:29:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 10:29:36 +0100 |
commit | 701ce9b3342647cf01cb23c4fc28bc99ce0aa8c1 (patch) | |
tree | e7e36d47453f8f2fe16027ed54d37fee75b153dc /cli/compilers/ts.rs | |
parent | 79b3bc05d6de520f1df73face1744ae3d8be0bb8 (diff) |
refactor: Use PathBuf for paths in flag parsing and whitelists (#3955)
* Use PathBuf for DenoSubcommand::Bundle's out_file
* Use PathBuf for DenoSubcommand::Format's files
* Use PathBuf for DenoSubcommand::Install's dir
* Use PathBuf for read/write whitelists
Diffstat (limited to 'cli/compilers/ts.rs')
-rw-r--r-- | cli/compilers/ts.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index d1fb3a6ac..d0c0d87c0 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -170,7 +170,7 @@ fn req( request_type: msg::CompilerRequestType, root_names: Vec<String>, compiler_config: CompilerConfig, - out_file: Option<String>, + out_file: Option<PathBuf>, target: &str, bundle: bool, ) -> Buf { @@ -275,7 +275,7 @@ impl TsCompiler { &self, global_state: GlobalState, module_name: String, - out_file: Option<String>, + out_file: Option<PathBuf>, ) -> Result<(), ErrBox> { debug!( "Invoking the compiler to bundle. module_name: {}", @@ -743,7 +743,7 @@ mod tests { .bundle_async( state.clone(), module_name, - Some(String::from("$deno$/bundle.js")), + Some(PathBuf::from("$deno$/bundle.js")), ) .await; assert!(result.is_ok()); |