diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-07-20 16:25:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-20 16:25:36 +0200 |
| commit | d744c0c6d9a557bbaa2a23571ffb3acabf19c35a (patch) | |
| tree | 6f7fb8a71b786e79c48f4b2c11a5a9ca988717e8 /docs/testing/documentation.md | |
| parent | 9b9becf1ae256b645e37a7eecf3441f3ae4b8ea5 (diff) | |
chore: move docs to separate repository
Diffstat (limited to 'docs/testing/documentation.md')
| -rw-r--r-- | docs/testing/documentation.md | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/docs/testing/documentation.md b/docs/testing/documentation.md deleted file mode 100644 index f0a2061db..000000000 --- a/docs/testing/documentation.md +++ /dev/null @@ -1,39 +0,0 @@ -# Documentation tests - -Deno supports type-checking your documentation examples. - -This makes sure that examples within your documentation are up to date and -working. - -The basic idea is this: - -````ts -/** - * # Examples - * - * ```ts - * const x = 42; - * ``` - */ -```` - -The triple backticks mark the start and end of code blocks. - -If this example was in a file named foo.ts, running `deno test --doc foo.ts` -will extract this example, and then type-check it as a standalone module living -in the same directory as the module being documented. - -To document your exports, import the module using a relative path specifier: - -````ts -/** - * # Examples - * - * ```ts - * import { foo } from "./foo.ts"; - * ``` - */ -export function foo(): string { - return "foo"; -} -```` |
