summaryrefslogtreecommitdiff
path: root/cli/tests/test/doc.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-05-11 07:54:39 +0800
committerGitHub <noreply@github.com>2021-05-11 01:54:39 +0200
commit36c5461129a1b769eb205765a79c5dc000b0b2f6 (patch)
treeeec51ab5f8419acaa5adf7fe84319e9773dec26c /cli/tests/test/doc.ts
parentc44e53a5b6bd8d995ddc32a0ba13d20bf4e70818 (diff)
feat(test): add support for type checking documentation (#10521)
This commit adds support for type checking codeblocks in the JS doc comments.
Diffstat (limited to 'cli/tests/test/doc.ts')
-rw-r--r--cli/tests/test/doc.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/test/doc.ts b/cli/tests/test/doc.ts
new file mode 100644
index 000000000..9298393eb
--- /dev/null
+++ b/cli/tests/test/doc.ts
@@ -0,0 +1,10 @@
+/**
+ * ```
+ * import { example } from "./doc.ts";
+ *
+ * console.assert(example() == 42);
+ * ```
+ */
+export function example(): string {
+ return "example";
+}