Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Dec 31, 2020
1 parent 4e05760 commit 9bb89a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions cli/dts/lib.deno.unstable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ declare namespace Deno {
/** Emit the source alongside the source maps within a single file; requires
* `inlineSourceMap` or `sourceMap` to be set. Defaults to `false`. */
inlineSources?: boolean;
/** Perform additional checks to ensure that transpile only would be safe.
* Defaults to `true`. */
isolatedModules?: boolean;
/** Support JSX in `.tsx` files: `"react"`, `"preserve"`, `"react-native"`.
* Defaults to `"react"`. */
jsx?: "react" | "preserve" | "react-native";
Expand Down Expand Up @@ -539,7 +536,7 @@ declare namespace Deno {
files: Record<string, string>;
/** An optional array of any compiler options that were ignored by Deno. */
ignoredOptions?: string[];
/** An array of internal statics related to the emit, for diagnostic
/** An array of internal statistics related to the emit, for diagnostic
* purposes. */
stats: Array<[string, number]>;
}
Expand All @@ -551,7 +548,7 @@ declare namespace Deno {
* `Deno.emit()` provides a way to provide Deno arbitrary JavaScript
* or TypeScript and have it return JavaScript based on the options and
* settings provided. The source code can either be provided or the modules
* can be fetched and resolved like other modules are resolved.
* can be fetched and resolved in line with the behavior of the command line.
*
* Requires `allow-read` and/or `allow-net` if sources are not provided.
*
Expand Down
8 changes: 4 additions & 4 deletions cli/ops/runtime_compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use crate::specifier_handler::FetchHandler;
use crate::specifier_handler::MemoryHandler;
use crate::specifier_handler::SpecifierHandler;

use deno_core::error::anyhow;
use deno_core::error::generic_error;
use deno_core::error::AnyError;
use deno_core::error::Context;
use deno_core::serde_json;
use deno_core::serde_json::json;
use deno_core::serde_json::Value;
Expand Down Expand Up @@ -76,9 +76,9 @@ async fn op_emit(
};
let maybe_import_map = if let Some(import_map_str) = args.import_map_path {
let import_map_specifier =
ModuleSpecifier::resolve_url_or_path(&import_map_str).map_err(|_| {
anyhow!("Bad file path (\"{}\") for import map.", import_map_str)
})?;
ModuleSpecifier::resolve_url_or_path(&import_map_str).context(
format!("Bad file path (\"{}\") for import map.", import_map_str),
)?;
let import_map_url = import_map_specifier.as_url();
let import_map = if let Some(value) = args.import_map {
ImportMap::from_json(&import_map_url.to_string(), &value.to_string())?
Expand Down
2 changes: 1 addition & 1 deletion cli/tsc_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ pub const IGNORED_COMPILER_OPTIONS: &[&str] = &[
"importHelpers",
"inlineSourceMap",
"inlineSources",
"isolatedModules",
"module",
"noEmitHelpers",
"noLib",
Expand Down Expand Up @@ -106,6 +105,7 @@ pub const IGNORED_RUNTIME_COMPILER_OPTIONS: &[&str] = &[
"help",
"incremental",
"init",
"isolatedModules",
"listEmittedFiles",
"listFiles",
"mapRoot",
Expand Down

0 comments on commit 9bb89a6

Please sign in to comment.