summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/check
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/check')
-rw-r--r--cli/tests/testdata/check/check_all.out4
-rw-r--r--cli/tests/testdata/check/check_all.ts3
-rw-r--r--cli/tests/testdata/check/declaration_header_file_with_no_exports.ts2
-rw-r--r--cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts0
-rw-r--r--cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js1
-rw-r--r--cli/tests/testdata/check/module_detection_force.ts3
-rw-r--r--cli/tests/testdata/check/module_detection_force/import.ts2
-rw-r--r--cli/tests/testdata/check/module_detection_force/main.ts3
8 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/testdata/check/check_all.out b/cli/tests/testdata/check/check_all.out
new file mode 100644
index 000000000..344264634
--- /dev/null
+++ b/cli/tests/testdata/check/check_all.out
@@ -0,0 +1,4 @@
+error: TS2322 [ERROR]: Type '12' is not assignable to type '"a"'.
+export const a: "a" = 12;
+ ^
+ at http://localhost:4545/subdir/type_error.ts:1:14
diff --git a/cli/tests/testdata/check/check_all.ts b/cli/tests/testdata/check/check_all.ts
new file mode 100644
index 000000000..2ae8c2692
--- /dev/null
+++ b/cli/tests/testdata/check/check_all.ts
@@ -0,0 +1,3 @@
+import * as a from "http://localhost:4545/subdir/type_error.ts";
+
+console.log(a.a);
diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts
new file mode 100644
index 000000000..ef5da7a38
--- /dev/null
+++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts
@@ -0,0 +1,2 @@
+import * as foo from "./declaration_header_file_with_no_exports_js.js";
+console.log(foo);
diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts
diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js
new file mode 100644
index 000000000..b8ae2bcef
--- /dev/null
+++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js
@@ -0,0 +1 @@
+/// <reference types="./declaration_header_file_with_no_exports_js.d.ts" />
diff --git a/cli/tests/testdata/check/module_detection_force.ts b/cli/tests/testdata/check/module_detection_force.ts
new file mode 100644
index 000000000..185ceb816
--- /dev/null
+++ b/cli/tests/testdata/check/module_detection_force.ts
@@ -0,0 +1,3 @@
+const a = 1;
+await import("./module_detection_force/import.ts");
+console.log(a);
diff --git a/cli/tests/testdata/check/module_detection_force/import.ts b/cli/tests/testdata/check/module_detection_force/import.ts
new file mode 100644
index 000000000..66b229870
--- /dev/null
+++ b/cli/tests/testdata/check/module_detection_force/import.ts
@@ -0,0 +1,2 @@
+const a = 2;
+console.log(a);
diff --git a/cli/tests/testdata/check/module_detection_force/main.ts b/cli/tests/testdata/check/module_detection_force/main.ts
new file mode 100644
index 000000000..a55c9962b
--- /dev/null
+++ b/cli/tests/testdata/check/module_detection_force/main.ts
@@ -0,0 +1,3 @@
+const a = 1;
+await import("./import.ts");
+console.log(a);