summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/subdir
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-12-10 09:12:21 +1100
committerGitHub <noreply@github.com>2021-12-10 09:12:21 +1100
commit345f0fbe5cdaa71af067c7072537f1823fe4ada5 (patch)
treec37062607fe23ef9d1826c1d43a10a712b827f3c /cli/tests/testdata/subdir
parenta3d024ac2ec8d73f7bf268823866d2342d1c1eb1 (diff)
feat(cli): update to TypeScript 4.5 (#12410)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tests/testdata/subdir')
-rw-r--r--cli/tests/testdata/subdir/export_types.ts11
-rw-r--r--cli/tests/testdata/subdir/import.mts4
-rw-r--r--cli/tests/testdata/subdir/mod.mjs1
-rw-r--r--cli/tests/testdata/subdir/types.d.mts1
-rw-r--r--cli/tests/testdata/subdir/types.d.ts1
5 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/testdata/subdir/export_types.ts b/cli/tests/testdata/subdir/export_types.ts
new file mode 100644
index 000000000..18c8ed881
--- /dev/null
+++ b/cli/tests/testdata/subdir/export_types.ts
@@ -0,0 +1,11 @@
+export interface A {
+ a: string;
+}
+
+export class B implements A {
+ a = "a";
+}
+
+export function create(): B {
+ return new B();
+}
diff --git a/cli/tests/testdata/subdir/import.mts b/cli/tests/testdata/subdir/import.mts
new file mode 100644
index 000000000..eeb200f59
--- /dev/null
+++ b/cli/tests/testdata/subdir/import.mts
@@ -0,0 +1,4 @@
+import * as a from "./mod.mjs";
+import { type A } from "./types.d.mts";
+
+console.log(a.a as A);
diff --git a/cli/tests/testdata/subdir/mod.mjs b/cli/tests/testdata/subdir/mod.mjs
new file mode 100644
index 000000000..9233cce2f
--- /dev/null
+++ b/cli/tests/testdata/subdir/mod.mjs
@@ -0,0 +1 @@
+export const a = "a";
diff --git a/cli/tests/testdata/subdir/types.d.mts b/cli/tests/testdata/subdir/types.d.mts
new file mode 100644
index 000000000..28c282146
--- /dev/null
+++ b/cli/tests/testdata/subdir/types.d.mts
@@ -0,0 +1 @@
+export type A = "a";
diff --git a/cli/tests/testdata/subdir/types.d.ts b/cli/tests/testdata/subdir/types.d.ts
index 7f587e144..536a6d0a6 100644
--- a/cli/tests/testdata/subdir/types.d.ts
+++ b/cli/tests/testdata/subdir/types.d.ts
@@ -1 +1,2 @@
+// deno-lint-ignore-file no-var
declare var a: string;