diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-09-22 23:05:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-23 00:05:42 +0200 |
| commit | ef3e4a8f74ea65cfed58c1276696f50a8779f816 (patch) | |
| tree | 9c7dd09f51087d525c0354962b215fc33febb57e /tests/specs/run/window/window3.out | |
| parent | 0cb00a6e89d83d4e16e6616f7af8819bd894b0da (diff) | |
feat: Show hints when using `window` global (#25805)
This commit adds better handling for terminal errors when
`window` global is used. This global is removed in Deno 2,
and while we have lints to help with that, an information and
hints are helpful to guide users to working code.
Ref https://github.com/denoland/deno/issues/25797
Diffstat (limited to 'tests/specs/run/window/window3.out')
| -rw-r--r-- | tests/specs/run/window/window3.out | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/specs/run/window/window3.out b/tests/specs/run/window/window3.out new file mode 100644 index 000000000..9a157975f --- /dev/null +++ b/tests/specs/run/window/window3.out @@ -0,0 +1,7 @@ +error: Uncaught (in promise) ReferenceError: window is not defined +window.navigator; +^ + at [WILDCARD]window3.js:1:1 + + info: window global is not available in Deno 2. + hint: Replace `window` with `globalThis`. |
