summaryrefslogtreecommitdiff
path: root/cli/tsc.rs
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-12-15 07:39:20 +1100
committerGitHub <noreply@github.com>2021-12-15 07:39:20 +1100
commite8d7b430cecf4357bd9b2ea717266e339516aa19 (patch)
treeed363a243a4af31d8d06e0bba028f72f2900827e /cli/tsc.rs
parentb220a58d1a678ffd46a42567909d0b0d59731d99 (diff)
chore: updates to support deno_graph API changes (#13080)
Diffstat (limited to 'cli/tsc.rs')
-rw-r--r--cli/tsc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs
index c2b4daef2..bc18efee0 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -384,8 +384,8 @@ fn op_load(state: &mut State, args: Value) -> Result<Value, AnyError> {
specifier
};
let maybe_source = if let Some(module) = state.graph.get(&specifier) {
- media_type = module.media_type;
- Some(module.source.as_str().to_string())
+ media_type = *module.media_type();
+ module.maybe_source().map(String::from)
} else {
media_type = MediaType::Unknown;
None
@@ -416,7 +416,7 @@ fn resolve_specifier(
let media_type = state
.graph
.get(specifier)
- .map_or(&MediaType::Unknown, |m| &m.media_type);
+ .map_or(&MediaType::Unknown, |m| m.media_type());
let specifier_str = match specifier.scheme() {
"data" | "blob" => {
let specifier_str = hash_url(specifier, media_type);