summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/run/check_js_points_to_ts/bar.ts3
-rw-r--r--cli/tests/testdata/run/check_js_points_to_ts/foo.d.ts0
-rw-r--r--cli/tests/testdata/run/check_js_points_to_ts/foo.js4
-rw-r--r--cli/tests/testdata/run/check_js_points_to_ts/test.js3
-rw-r--r--cli/tests/testdata/run/check_js_points_to_ts/test.js.out4
5 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/testdata/run/check_js_points_to_ts/bar.ts b/cli/tests/testdata/run/check_js_points_to_ts/bar.ts
new file mode 100644
index 000000000..026cd2f1e
--- /dev/null
+++ b/cli/tests/testdata/run/check_js_points_to_ts/bar.ts
@@ -0,0 +1,3 @@
+export function bar(): string {
+ return 42;
+}
diff --git a/cli/tests/testdata/run/check_js_points_to_ts/foo.d.ts b/cli/tests/testdata/run/check_js_points_to_ts/foo.d.ts
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/cli/tests/testdata/run/check_js_points_to_ts/foo.d.ts
diff --git a/cli/tests/testdata/run/check_js_points_to_ts/foo.js b/cli/tests/testdata/run/check_js_points_to_ts/foo.js
new file mode 100644
index 000000000..9ac1a14ff
--- /dev/null
+++ b/cli/tests/testdata/run/check_js_points_to_ts/foo.js
@@ -0,0 +1,4 @@
+import { bar } from "./bar.ts";
+export function foo() {
+ bar();
+}
diff --git a/cli/tests/testdata/run/check_js_points_to_ts/test.js b/cli/tests/testdata/run/check_js_points_to_ts/test.js
new file mode 100644
index 000000000..00d894451
--- /dev/null
+++ b/cli/tests/testdata/run/check_js_points_to_ts/test.js
@@ -0,0 +1,3 @@
+// @deno-types="./foo.d.ts"
+import { foo } from "./foo.js";
+foo();
diff --git a/cli/tests/testdata/run/check_js_points_to_ts/test.js.out b/cli/tests/testdata/run/check_js_points_to_ts/test.js.out
new file mode 100644
index 000000000..c052a7c3d
--- /dev/null
+++ b/cli/tests/testdata/run/check_js_points_to_ts/test.js.out
@@ -0,0 +1,4 @@
+error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'.
+ return 42;
+ ~~~~~~~~~~
+ at [WILDCARD]