summaryrefslogtreecommitdiff
path: root/tests/type_definitions
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2019-08-23 02:05:01 +1000
committerRyan Dahl <ry@tinyclouds.org>2019-08-22 12:05:01 -0400
commit6c7d337960b3745a7b614a18150862279ef1c942 (patch)
treeab2d432d80c1bb2bfdc9d77de1644d3b1e4fa4b7 /tests/type_definitions
parentbdc97b3976786bb744a27e59b0f4f28554a682df (diff)
Support .d.ts files (#2746)
Fixes #1432
Diffstat (limited to 'tests/type_definitions')
-rw-r--r--tests/type_definitions/bar.d.ts7
-rw-r--r--tests/type_definitions/foo.d.ts2
-rw-r--r--tests/type_definitions/foo.js1
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/type_definitions/bar.d.ts b/tests/type_definitions/bar.d.ts
new file mode 100644
index 000000000..d43335dbb
--- /dev/null
+++ b/tests/type_definitions/bar.d.ts
@@ -0,0 +1,7 @@
+/// <reference types="baz" />
+
+declare namespace bar {
+ export class Bar {
+ baz: string;
+ }
+}
diff --git a/tests/type_definitions/foo.d.ts b/tests/type_definitions/foo.d.ts
new file mode 100644
index 000000000..ce39201e1
--- /dev/null
+++ b/tests/type_definitions/foo.d.ts
@@ -0,0 +1,2 @@
+/** An exported value. */
+export const foo: string;
diff --git a/tests/type_definitions/foo.js b/tests/type_definitions/foo.js
new file mode 100644
index 000000000..61d366eb2
--- /dev/null
+++ b/tests/type_definitions/foo.js
@@ -0,0 +1 @@
+export const foo = "foo";