summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/check/deno_not_found
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-07-13 19:29:51 -0400
committerGitHub <noreply@github.com>2023-07-13 23:29:51 +0000
commitb03d82e5d34ed11185fd3b9ce4db7bb838c65658 (patch)
treeea4d490606168f6bd91f89e16b970b4b3a37ae19 /cli/tests/testdata/check/deno_not_found
parent8465bd0037acbaac0c7dfab6a8c6dbf47539934e (diff)
fix(tsc): more informative diagnostic when `Deno` does not exist (#19825)
Also improved the diagnostic when using something like `Deno.openKv` and it doesn't exist.
Diffstat (limited to 'cli/tests/testdata/check/deno_not_found')
-rw-r--r--cli/tests/testdata/check/deno_not_found/main.out4
-rw-r--r--cli/tests/testdata/check/deno_not_found/main.ts4
2 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/testdata/check/deno_not_found/main.out b/cli/tests/testdata/check/deno_not_found/main.out
new file mode 100644
index 000000000..39852ab95
--- /dev/null
+++ b/cli/tests/testdata/check/deno_not_found/main.out
@@ -0,0 +1,4 @@
+error: TS2304 [ERROR]: Cannot find name 'Deno'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'deno.ns' or add a triple-slash directive to your entrypoint: /// <reference lib="deno.ns" />
+Deno;
+~~~~
+ at file:///[WILDCARD]/check/deno_not_found/main.ts:4:1
diff --git a/cli/tests/testdata/check/deno_not_found/main.ts b/cli/tests/testdata/check/deno_not_found/main.ts
new file mode 100644
index 000000000..3269f047a
--- /dev/null
+++ b/cli/tests/testdata/check/deno_not_found/main.ts
@@ -0,0 +1,4 @@
+/// <reference no-default-lib="true"/>
+/// <reference lib="es5" />
+
+Deno;