diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-09-24 07:04:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 07:04:52 -0700 |
commit | 5a1943cd9560466a5922bd3cd79cca5c9f378561 (patch) | |
tree | 8d73d135dc638a2d8d169bc93df8ddbccfedf945 /cli/main.rs | |
parent | 3242550f5f0b33769a4e0a24a7dc96773647ca75 (diff) |
fix: better error for Deno.UnsafeWindowSurface, correct HttpClient name, cleanup unused code (#25833)
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs index 84c3704ca..c0eccab5d 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -385,6 +385,13 @@ fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec<FixSuggestion> { FixSuggestion::info("window global is not available in Deno 2."), FixSuggestion::hint("Replace `window` with `globalThis`."), ]; + } else if msg.contains("UnsafeWindowSurface is not a constructor") { + return vec![ + FixSuggestion::info("Deno.UnsafeWindowSurface is an unstable API."), + FixSuggestion::hint( + "Run again with `--unstable-webgpu` flag to enable this API.", + ), + ]; } } |