diff --git a/.editorconfig b/.editorconfig index 443b276cc..597e75449 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -[**.js] +[*.{js,css}] indent_style = space indent_size = 2 trim_trailing_whitespace = true diff --git a/.eslintignore b/.eslintignore index cf2f465ce..8d6eafa02 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,5 @@ -test/fixture/* +__tests__/fixture/* +src/default_theme/* +coverage/* +lib/* +declarations/* diff --git a/.eslintrc b/.eslintrc index aa5b80ed0..2bf300124 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,44 +1,34 @@ { "root": true, - "parser": "espree", + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 2020 + }, "rules": { - "space-in-parens": 2, - "space-before-blocks": 2, - "keyword-spacing": 2, - "space-unary-ops": 2, - "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}], + "no-var": 2, + "prefer-const": 2, "no-use-before-define": [2, "nofunc"], "camelcase": 2, - "semi": 2, - "comma-style": 2, "no-lonely-if": 2, - "max-len": [2, 120], "no-else-return": 2, - "no-trailing-spaces": 2, "new-cap": 2, "no-empty": 2, "consistent-return": 0, "no-new": 2, - "key-spacing": 2, - "no-multi-spaces": 2, - "valid-jsdoc": 2, - "brace-style": 2, + "object-shorthand": ["error", "always", { "avoidQuotes": true }], "no-throw-literal": 2, "no-self-compare": 2, "no-void": 2, "no-unused-vars": 2, "wrap-iife": 2, "no-eq-null": 2, - "quotes": [2, "single"], - "indent": [2, 2], - "curly": 2, + "strict": [2, "global"], "no-shadow": 0, "no-undef": 2 }, - "extends": "eslint:recommended", + "extends": ["eslint:recommended", "prettier"], "env": { "node": true, - "es6": true, - "browser": true + "es6": true } } diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..bb236c12d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/en/code-security/dependabot + +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + - package-ecosystem: npm + directory: / + schedule: + interval: weekly diff --git a/.github/documentation-js-logo.png b/.github/documentation-js-logo.png new file mode 100644 index 000000000..595163c50 Binary files /dev/null and b/.github/documentation-js-logo.png differ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..db650acb4 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '0 0 1 * *' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript-typescript' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 000000000..2d8e7a62f --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run test-ci diff --git a/.gitignore b/.gitignore index 94196f192..b7cc0fe92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ coverage .nyc_output -node_modules +/node_modules diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..d4a43dd13 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run pre-commit diff --git a/.npmignore b/.npmignore index 8c48b804a..7c3ebf56a 100644 --- a/.npmignore +++ b/.npmignore @@ -6,4 +6,10 @@ .nyc_output circle.yml coverage -test +__tests__ +.circleci +.github +.prettierignore +.prettierrc +CODE_OF_CONDUCT.md +ISSUE_TEMPLATE.md diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..d826961de --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +__tests__/fixture diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..b0a179d48 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "singleQuote": true, + "trailingComma": "none", + "arrowParens": "avoid" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1e544db..dd16f8756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,942 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [14.0.3](https://github.com/documentationjs/documentation/compare/v14.0.1...v14.0.3) (2024-01-30) + + +### Bug Fixes + +* **exported:** respect `parse-extension` & `require-extension` ([#1484](https://github.com/documentationjs/documentation/issues/1484)) ([798fa10](https://github.com/documentationjs/documentation/commit/798fa10595d7523032ac187ae9c8aa943c15e8da)), closes [#1272](https://github.com/documentationjs/documentation/issues/1272) [#1258](https://github.com/documentationjs/documentation/issues/1258) +* fix GFM markdown output ([#1553](https://github.com/documentationjs/documentation/issues/1553)) ([1cc2f98](https://github.com/documentationjs/documentation/commit/1cc2f984315fc5aaf898c64d8e1eb2b4e70cd482)) + +### [14.0.2](https://github.com/documentationjs/documentation/compare/v14.0.1...v14.0.2) (2023-05-19) + + +### Bug Fixes + +* **exported:** respect `parse-extension` & `require-extension` ([#1484](https://github.com/documentationjs/documentation/issues/1484)) ([798fa10](https://github.com/documentationjs/documentation/commit/798fa10595d7523032ac187ae9c8aa943c15e8da)), closes [#1272](https://github.com/documentationjs/documentation/issues/1272) [#1258](https://github.com/documentationjs/documentation/issues/1258) + +## [14.0.1](https://github.com/documentationjs/documentation/compare/v14.0.0...v14.0.1) (2022-12-14) + +### Improvements +* chore: upgrade git-url-parse to 13.1.0 to fix vulnerabilities [#1565](https://github.com/documentationjs/documentation/pull/1565) + +## [14.0.0](https://github.com/documentationjs/documentation/compare/v14.0.0-alpha.1...v14.0.0) (2022-08-19) + +## [14.0.0-alpha.1](https://github.com/documentationjs/documentation/compare/v14.0.0-alpha.0...v14.0.0-alpha.1) (2022-08-07) + + +### Features + +* :sparkles: update Babel, copy list of plugins from Prettier ([3f187d7](https://github.com/documentationjs/documentation/commit/3f187d73132c6667a9140bd491c5f703c1f37c40)) + +## [14.0.0-alpha.0](https://github.com/documentationjs/documentation/compare/v13.2.5...v14.0.0-alpha.0) (2022-08-05) + + +### ⚠ BREAKING CHANGES + +* all Extensions should contains '.' so that mean if you have just 'ts' then need to convert to '.ts' +* external parameter was removed +Migration plan propose to move all external resources to input usages +Motivation: packages has many inputs which describe in package.json +so that mean need each time to parse all package.json of external resources to understand which entry point need to pick. +But it is base on guesses because entry point may could not contains a documentation and the best way to handle it manually. +* The serve parameter was removed, you can use any other tools which could be refresh and store your html site +The private parameter has removed, use a access +* documentation.js will now require node 14 or later. + +### Bug Fixes + +* add micromark dependencies fixed [#1381](https://github.com/documentationjs/documentation/issues/1381) ([3ba8165](https://github.com/documentationjs/documentation/commit/3ba81659d7db5d9393fa083287d91db93d6aab5e)) +* add TS and TSX as default extensions fixed [#1377](https://github.com/documentationjs/documentation/issues/1377) ([f0cb1c0](https://github.com/documentationjs/documentation/commit/f0cb1c0bb1d97228c7baab453e50e5dbe283ea46)) +* external was removed as prefer of input usages ([e3c59d7](https://github.com/documentationjs/documentation/commit/e3c59d77e4e3cf6e5fabab7c0d853a06a77f6288)) +* html report, it is return html if output is not defined ([0975871](https://github.com/documentationjs/documentation/commit/0975871b34b8cc0af74e0aebb43f2727e0ab9960)) +* remove private parameter, use access (BREAKING CHANGES) ([874069c](https://github.com/documentationjs/documentation/commit/874069c0b3647dad413667f61d05f6d39992995d)) +* The server parameter deprecated and will be remove in next Major version fixed [#1413](https://github.com/documentationjs/documentation/issues/1413) ([810e08b](https://github.com/documentationjs/documentation/commit/810e08b6fdb1076a1758bff831a9f42890f0f25f)) +* use process.cwd vs `.` which can fail ([4cc70a5](https://github.com/documentationjs/documentation/commit/4cc70a5aed0c233cdcc72077733f9da8450be386)) + + +* replace module-deps-sortable on own implementation to control how parse files ([abb781a](https://github.com/documentationjs/documentation/commit/abb781a69ac69423da11346f62d7064382bb7b74)) +* Update Node minimum version to 14 ([fc0bb3c](https://github.com/documentationjs/documentation/commit/fc0bb3cd885b9577e6f1f6935e15d4ec24f89114)) + +### [13.2.5](https://github.com/documentationjs/documentation/compare/v13.2.4...v13.2.5) (2021-04-24) + + +### Bug Fixes + +* add gfm format for remark fixed [#1374](https://github.com/documentationjs/documentation/issues/1374) ([#1375](https://github.com/documentationjs/documentation/issues/1375)) ([6b5bc25](https://github.com/documentationjs/documentation/commit/6b5bc2548db23fdab3fd8d29ac1aeedea7ad3a47)) +* jsx should be included for tsx files but not for ts fixed [#1359](https://github.com/documentationjs/documentation/issues/1359) ([#1373](https://github.com/documentationjs/documentation/issues/1373)) ([00d434f](https://github.com/documentationjs/documentation/commit/00d434f8576969b00d53a20efebb52a880acf350)) + +### [13.2.4](https://github.com/documentationjs/documentation/compare/v13.2.3...v13.2.4) (2021-04-21) + + +### Bug Fixes + +* add support Vue 3 fixed [#1339](https://github.com/documentationjs/documentation/issues/1339) ([#1372](https://github.com/documentationjs/documentation/issues/1372)) ([cd7d123](https://github.com/documentationjs/documentation/commit/cd7d12366cc499ae8d40a64905354c3479f802f6)) + +### [13.2.3](https://github.com/documentationjs/documentation/compare/v13.2.2...v13.2.3) (2021-04-20) + +### [13.2.2](https://github.com/documentationjs/documentation/compare/v13.2.1...v13.2.2) (2021-04-20) + + +### Bug Fixes + +* [@see](https://github.com/see) tags incorrectly formatted in markdown output fixed [#1337](https://github.com/documentationjs/documentation/issues/1337) ([5d8d450](https://github.com/documentationjs/documentation/commit/5d8d4504d52a5bb0a0432bf399bbd82d9e5ea7fc)) + +### [13.2.1](https://github.com/documentationjs/documentation/compare/v13.2.0...v13.2.1) (2021-04-06) + +## [13.2.0](https://github.com/documentationjs/documentation/compare/v13.1.1...v13.2.0) (2021-03-13) + + +### Features + +* Support import.meta ([d449e7c](https://github.com/documentationjs/documentation/commit/d449e7c3ca0abb7379ea4159b0ef0281059077eb)), closes [#1345](https://github.com/documentationjs/documentation/issues/1345) + +### [13.1.1](https://github.com/documentationjs/documentation/compare/v13.1.0...v13.1.1) (2021-01-19) + +## [13.1.0](https://github.com/documentationjs/documentation/compare/v13.0.2...v13.1.0) (2020-10-24) + + +### Features + +* Add event members to md output ([#1336](https://github.com/documentationjs/documentation/issues/1336)) ([bc3233f](https://github.com/documentationjs/documentation/commit/bc3233fe7e414e65756cf50450ebad069e37506a)) + +### [13.0.2](https://github.com/documentationjs/documentation/compare/v13.0.1...v13.0.2) (2020-07-02) + + +### Bug Fixes + +* Additional safety around detecting functions in HTML output ([a8b6ce1](https://github.com/documentationjs/documentation/commit/a8b6ce144ea380ad21ba99f03574f6258be10666)) + +### [13.0.1](https://github.com/documentationjs/documentation/compare/v13.0.0...v13.0.1) (2020-06-04) + + +### Bug Fixes + +* 🐛 Error with flow opaque type and readme command ([78db9a4](https://github.com/documentationjs/documentation/commit/78db9a443a65bbe8ff202083351655e0cfa60004)), closes [#1322](https://github.com/documentationjs/documentation/issues/1322) +* 🐛 Fixes an issue when using object spread and $Exact ([106945c](https://github.com/documentationjs/documentation/commit/106945c6354f0b70335adf737c7b7fa296952cc3)), closes [#1324](https://github.com/documentationjs/documentation/issues/1324) + + +# [13.0.0](https://github.com/documentationjs/documentation/compare/v12.3.0...v13.0.0) (2020-05-09) + + +### Chores + +* Update Node minimum version to 10 ([45a5257](https://github.com/documentationjs/documentation/commit/45a5257)) + + +### BREAKING CHANGES + +* documentation.js will now require node 10 or later. + + + + +# [12.3.0](https://github.com/documentationjs/documentation/compare/v12.2.0...v12.3.0) (2020-04-07) + + +### Features + +* upgrade babel dependencies ([d0ec029](https://github.com/documentationjs/documentation/commit/d0ec029)) + + + + +# [12.2.0](https://github.com/documentationjs/documentation/compare/v12.1.4...v12.2.0) (2020-03-31) + + +### Features + +* support for the [@see](https://github.com/see) tag in Markdown & HTML ([48bb7a2](https://github.com/documentationjs/documentation/commit/48bb7a2)) + + + + +## [12.1.4](https://github.com/documentationjs/documentation/compare/v12.1.3...v12.1.4) (2019-11-15) + + + + +## [12.1.3](https://github.com/documentationjs/documentation/compare/v12.1.2...v12.1.3) (2019-11-04) + + +### Bug Fixes + +* upgrade git-url-parse to fix a parsing issue ([#1296](https://github.com/documentationjs/documentation/issues/1296)) ([344e804](https://github.com/documentationjs/documentation/commit/344e804)) + + + + +## [12.1.2](https://github.com/documentationjs/documentation/compare/v12.1.1...v12.1.2) (2019-09-09) + + +### Bug Fixes + +* check for empty diff ([#1273](https://github.com/documentationjs/documentation/issues/1273)) ([3e0958b](https://github.com/documentationjs/documentation/commit/3e0958b)) + + + + +## [12.1.1](https://github.com/documentationjs/documentation/compare/v12.1.0...v12.1.1) (2019-08-01) + + +### Bug Fixes + +* Git submodule support for repo names with a dot ([#1271](https://github.com/documentationjs/documentation/issues/1271)) ([27a29be](https://github.com/documentationjs/documentation/commit/27a29be)) + + + + +# [12.1.0](https://github.com/documentationjs/documentation/compare/v12.0.3...v12.1.0) (2019-07-31) + + +### Features + +* Add git submodules support to github linking ([#1270](https://github.com/documentationjs/documentation/issues/1270)) ([ec36b41](https://github.com/documentationjs/documentation/commit/ec36b41)) + + + + +## [12.0.3](https://github.com/documentationjs/documentation/compare/v12.0.2...v12.0.3) (2019-07-22) + + +### Bug Fixes + +* Allow skipped array arguments in destructuring. Fixes [#1247](https://github.com/documentationjs/documentation/issues/1247) ([#1266](https://github.com/documentationjs/documentation/issues/1266)) ([f9039e9](https://github.com/documentationjs/documentation/commit/f9039e9)) + + + + +## [12.0.2](https://github.com/documentationjs/documentation/compare/v12.0.1...v12.0.2) (2019-07-16) + + + + +## [12.0.1](https://github.com/documentationjs/documentation/compare/v12.0.0...v12.0.1) (2019-07-10) + + +### Bug Fixes + +* Crash when called with no inputs. yargs now variadic positional arguments undefined instead of [] ([821a15e](https://github.com/documentationjs/documentation/commit/821a15e)) + + + + +# [12.0.0](https://github.com/documentationjs/documentation/compare/v11.0.1...v12.0.0) (2019-07-10) + + +* Formatted with Prettier ([8f36e75](https://github.com/documentationjs/documentation/commit/8f36e75)) + + +### BREAKING CHANGES + +* The next release will require Node 8 + + + + +## [11.0.1](https://github.com/documentationjs/documentation/compare/v11.0.0...v11.0.1) (2019-06-12) + + +### Bug Fixes + +* toc with children getting displayed as "note" ([#1253](https://github.com/documentationjs/documentation/issues/1253)) ([14298bb](https://github.com/documentationjs/documentation/commit/14298bb)) + + + + +# [11.0.0](https://github.com/documentationjs/documentation/compare/v10.1.0...v11.0.0) (2019-05-08) + + +### Bug Fixes + +* Fix parsing of optional parameters with annotations ([ca17de5](https://github.com/documentationjs/documentation/commit/ca17de5)) + + +### Features + +* Enable all parser plugins ([fa1b0b5](https://github.com/documentationjs/documentation/commit/fa1b0b5)) +* Support exportNamespaceFrom in parser ([8fa141d](https://github.com/documentationjs/documentation/commit/8fa141d)) + + +### BREAKING CHANGES + +* this removes support for legacy decorators, because +in one place we had legacy and in another we didn't. + + + + +# [10.1.0](https://github.com/documentationjs/documentation/compare/v10.0.0...v10.1.0) (2019-04-25) + + +### Features + +* TypeScript support & inference ([3773e02](https://github.com/documentationjs/documentation/commit/3773e02)) + + + + +# [10.0.0](https://github.com/documentationjs/documentation/compare/v10.0.0-alpha.0...v10.0.0) (2019-04-18) + + +### Features + +* Add flow inference for generators ([7947e97](https://github.com/documentationjs/documentation/commit/7947e97)) +* Support async functions ([d31c3b7](https://github.com/documentationjs/documentation/commit/d31c3b7)) +* Support classPrivateProperties in parser ([64ef671](https://github.com/documentationjs/documentation/commit/64ef671)), closes [#1216](https://github.com/documentationjs/documentation/issues/1216) +* Support generator functions ([8e3cd47](https://github.com/documentationjs/documentation/commit/8e3cd47)) + + + + +# [10.0.0-alpha.0](https://github.com/documentationjs/documentation/compare/v9.3.1...v10.0.0-alpha.0) (2019-03-12) + + +### Features + +* Support custom babel config ([#1205](https://github.com/documentationjs/documentation/issues/1205)) ([746d0a9](https://github.com/documentationjs/documentation/commit/746d0a9)) + + +### BREAKING CHANGES + +* this may change babel configuration loading, and is a +major change to the documentation.js approach to Babel. + + + + +## [9.3.1](https://github.com/documentationjs/documentation/compare/v9.3.0...v9.3.1) (2019-03-12) + + + + +# [9.3.0](https://github.com/documentationjs/documentation/compare/v9.2.1...v9.3.0) (2019-02-27) + + +### Features + +* Add inner section ([#1212](https://github.com/documentationjs/documentation/issues/1212)) ([64c9ca6](https://github.com/documentationjs/documentation/commit/64c9ca6)) + + + + +## [9.2.1](https://github.com/documentationjs/documentation/compare/v9.2.0...v9.2.1) (2019-02-26) + + + + +# [9.2.0](https://github.com/documentationjs/documentation/compare/v9.1.1...v9.2.0) (2019-02-22) + + +### Bug Fixes + +* **default theme:** only render either note or section (fixes [#1113](https://github.com/documentationjs/documentation/issues/1113)) ([#1206](https://github.com/documentationjs/documentation/issues/1206)) ([fb0a27f](https://github.com/documentationjs/documentation/commit/fb0a27f)) + + +### Features + +* Add favicon option ([#1207](https://github.com/documentationjs/documentation/issues/1207)) ([5b045f2](https://github.com/documentationjs/documentation/commit/5b045f2)) + + + + +## [9.1.1](https://github.com/documentationjs/documentation/compare/v9.1.0...v9.1.1) (2018-12-21) + + +### Bug Fixes + +* inferred properties duplicating explicitly specified ones ([2d0bd0e](https://github.com/documentationjs/documentation/commit/2d0bd0e)) + + + + +# [9.1.0](https://github.com/documentationjs/documentation/compare/v9.0.0...v9.1.0) (2018-12-17) + + +### Features + +* support spead types ([ca5a681](https://github.com/documentationjs/documentation/commit/ca5a681)) + + + + +# [9.0.0](https://github.com/documentationjs/documentation/compare/v9.0.0-alpha.1...v9.0.0) (2018-12-10) + + +### Features + +* Support for the logical assignment operator ([58d2a2f](https://github.com/documentationjs/documentation/commit/58d2a2f)), closes [#1172](https://github.com/documentationjs/documentation/issues/1172) + + + + +# [9.0.0-alpha.1](https://github.com/documentationjs/documentation/compare/v9.0.0-alpha.0...v9.0.0-alpha.1) (2018-10-24) + + +### Bug Fixes + +* **package:** update [@babel](https://github.com/babel)/parser to version 7.1.3 ([4dbb406](https://github.com/documentationjs/documentation/commit/4dbb406)), closes [#1145](https://github.com/documentationjs/documentation/issues/1145) +* add node-resolve to module-deps ([a033547](https://github.com/documentationjs/documentation/commit/a033547)) +* add tests ([a4107dc](https://github.com/documentationjs/documentation/commit/a4107dc)) + + +### Features + +* add support for node resolve algo ([ddd675d](https://github.com/documentationjs/documentation/commit/ddd675d)) + + + + +# [9.0.0-alpha.0](https://github.com/documentationjs/documentation/compare/v8.1.2...v9.0.0-alpha.0) (2018-09-21) + + +### Features + +* Babel 7 support ([49c0f72](https://github.com/documentationjs/documentation/commit/49c0f72)) + + +### BREAKING CHANGES + +* This moves documentation.js to Babel 7. From now on, +documentation.js will only support Babel 7: please stick to older +releases if you need to support Babel 6. Additionally, this work +temporarily disables support for following dynamic imports. + + + + +## [8.1.2](https://github.com/documentationjs/documentation/compare/v8.1.1...v8.1.2) (2018-08-23) + + +### Bug Fixes + +* membership infering for methods ([#1122](https://github.com/documentationjs/documentation/issues/1122)) ([40b1783](https://github.com/documentationjs/documentation/commit/40b1783)) + + + + +## [8.1.1](https://github.com/documentationjs/documentation/compare/v8.1.0...v8.1.1) (2018-08-17) + + +### Bug Fixes + +* Serve on correct port ([4d59f6f](https://github.com/documentationjs/documentation/commit/4d59f6f)) + + + + +# [8.1.0](https://github.com/documentationjs/documentation/compare/v8.0.2...v8.1.0) (2018-08-03) + + +### Bug Fixes + +* **package:** update get-port to version 4.0.0 ([9ca8c06](https://github.com/documentationjs/documentation/commit/9ca8c06)) + + +### Features + +* added project description ([45a9ea9](https://github.com/documentationjs/documentation/commit/45a9ea9)) + + + + +## [8.0.2](https://github.com/documentationjs/documentation/compare/v8.0.1...v8.0.2) (2018-07-20) + + +### Bug Fixes + +* **package:** update git-url-parse to version 10.0.1 ([91ade89](https://github.com/documentationjs/documentation/commit/91ade89)) + + + + +## [8.0.1](https://github.com/documentationjs/documentation/compare/v8.0.0...v8.0.1) (2018-07-16) + + +### Bug Fixes + +* **package:** update read-pkg-up to version 4.0.0 ([c700d3f](https://github.com/documentationjs/documentation/commit/c700d3f)) + + + + +# [8.0.0](https://github.com/documentationjs/documentation/compare/v7.1.0...v8.0.0) (2018-06-04) + + +### Features + +* Semantic markdown headings ([#1087](https://github.com/documentationjs/documentation/issues/1087)) ([ca6217f](https://github.com/documentationjs/documentation/commit/ca6217f)) + + +### BREAKING CHANGES + +* changes Markdown output + + + + +# [7.1.0](https://github.com/documentationjs/documentation/compare/v7.0.0...v7.1.0) (2018-05-26) + + +### Features + +* support flow comment types ([85d50f9](https://github.com/documentationjs/documentation/commit/85d50f9)) + + + + +# [7.0.0](https://github.com/documentationjs/documentation/compare/v6.3.3...v7.0.0) (2018-05-22) + + +### Features + +* Auto-detect readme filename ([4fd776b](https://github.com/documentationjs/documentation/commit/4fd776b)) + + +### BREAKING CHANGES + +* the --readme-file option now has a smart default value + + + + +## [6.3.3](https://github.com/documentationjs/documentation/compare/v6.3.2...v6.3.3) (2018-05-14) + + + + +## [6.3.2](https://github.com/documentationjs/documentation/compare/v6.3.1...v6.3.2) (2018-04-24) + + +### Bug Fixes + +* **vue:** Make vue parser tolerant of components that don't contain scripts ([#1061](https://github.com/documentationjs/documentation/issues/1061)) ([8f9bc7b](https://github.com/documentationjs/documentation/commit/8f9bc7b)), closes [#1060](https://github.com/documentationjs/documentation/issues/1060) + + + + +## [6.3.1](https://github.com/documentationjs/documentation/compare/v6.3.0...v6.3.1) (2018-04-23) + + +### Bug Fixes + +* adding vue support broke tests that are not file based ([#1058](https://github.com/documentationjs/documentation/issues/1058)) ([9d7bd2e](https://github.com/documentationjs/documentation/commit/9d7bd2e)), closes [#1057](https://github.com/documentationjs/documentation/issues/1057) + + + + +# [6.3.0](https://github.com/documentationjs/documentation/compare/v6.2.0...v6.3.0) (2018-04-20) + + +### Bug Fixes + +* **package:** update git-url-parse to version 9.0.0 ([94a1fb6](https://github.com/documentationjs/documentation/commit/94a1fb6)) + + +### Features + +* Vue Support ([f60d90c](https://github.com/documentationjs/documentation/commit/f60d90c)) + + + + +# [6.2.0](https://github.com/documentationjs/documentation/compare/v6.1.0...v6.2.0) (2018-04-11) + + +### Bug Fixes + +* get rid of shelljs dependency ([630625d](https://github.com/documentationjs/documentation/commit/630625d)) + + +### Features + +* **doctrine:** Support decorator syntax in examples ([b309d39](https://github.com/documentationjs/documentation/commit/b309d39)), closes [#1016](https://github.com/documentationjs/documentation/issues/1016) +* **inferTypes:** Support class properties ([22d8740](https://github.com/documentationjs/documentation/commit/22d8740)), closes [#1043](https://github.com/documentationjs/documentation/issues/1043) + + + + +# [6.1.0](https://github.com/documentationjs/documentation/compare/v6.0.0...v6.1.0) (2018-03-08) + + +### Bug Fixes + +* lends with object property using literal key ([#1035](https://github.com/documentationjs/documentation/issues/1035)) ([99ad49b](https://github.com/documentationjs/documentation/commit/99ad49b)) + + +### Features + +* Support class property [@type](https://github.com/type) tag ([#1028](https://github.com/documentationjs/documentation/issues/1028)) ([4ed5edf](https://github.com/documentationjs/documentation/commit/4ed5edf)) + + + + +# [6.0.0](https://github.com/documentationjs/documentation/compare/v5.5.0...v6.0.0) (2018-03-02) + + +### Features + +* documentation.js now requires node v6 or newer. ([#1034](https://github.com/documentationjs/documentation/issues/1034)) ([ccce516](https://github.com/documentationjs/documentation/commit/ccce516)) + + +### BREAKING CHANGES + +* documentation.js requires node v6 or newer. + + + + +# [5.5.0](https://github.com/documentationjs/documentation/compare/v5.4.0...v5.5.0) (2018-03-02) + + +### Bug Fixes + +* github links for [@typedef](https://github.com/typedef) comments should link to comment, not context ([#1024](https://github.com/documentationjs/documentation/issues/1024)) ([37a91b2](https://github.com/documentationjs/documentation/commit/37a91b2)) +* Make documentation.js compatible with node 4.x for one more version ([#1033](https://github.com/documentationjs/documentation/issues/1033)) ([5067ee0](https://github.com/documentationjs/documentation/commit/5067ee0)) + + +### Features + +* Support `--shallow` argument for `lint` command. Closes [#956](https://github.com/documentationjs/documentation/issues/956) ([#995](https://github.com/documentationjs/documentation/issues/995)) ([64f660d](https://github.com/documentationjs/documentation/commit/64f660d)) +* Support the .mjs extension by default. ([#1023](https://github.com/documentationjs/documentation/issues/1023)) ([b8a7e0d](https://github.com/documentationjs/documentation/commit/b8a7e0d)) +* use reference links for Markdown output, improving brevity ([ab494dd](https://github.com/documentationjs/documentation/commit/ab494dd)) + + + + +# [5.4.0](https://github.com/documentationjs/documentation/compare/v5.3.5...v5.4.0) (2018-02-10) + + +### Bug Fixes + +* **package:** update remark-toc to version 5.0.0 ([0bb3d0d](https://github.com/documentationjs/documentation/commit/0bb3d0d)) + + +### Features + +* add support for class param declarations at the constructor ([#1013](https://github.com/documentationjs/documentation/issues/1013)) ([05c5279](https://github.com/documentationjs/documentation/commit/05c5279)) + + + + +## [5.3.5](https://github.com/documentationjs/documentation/compare/v5.3.4...v5.3.5) (2017-12-12) + + +### Bug Fixes + +* **globals-docs:** Remove en-US from MDN links. ([#973](https://github.com/documentationjs/documentation/issues/973)) ([aa661ff](https://github.com/documentationjs/documentation/commit/aa661ff)), closes [#964](https://github.com/documentationjs/documentation/issues/964) + + + + +## [5.3.4](https://github.com/documentationjs/documentation/compare/v5.3.3...v5.3.4) (2017-12-12) + + +### Bug Fixes + +* **package:** update babelify to version 8.0.0 ([10dff6f](https://github.com/documentationjs/documentation/commit/10dff6f)) +* **package:** update read-pkg-up to version 3.0.0 ([d8fbf2c](https://github.com/documentationjs/documentation/commit/d8fbf2c)) +* **package:** update remark-html to version 7.0.0 ([9842814](https://github.com/documentationjs/documentation/commit/9842814)) +* **package:** update vinyl-fs to version 3.0.0 ([#966](https://github.com/documentationjs/documentation/issues/966)) ([1d6fe80](https://github.com/documentationjs/documentation/commit/1d6fe80)) + + + + +## [5.3.3](https://github.com/documentationjs/documentation/compare/v5.3.2...v5.3.3) (2017-10-12) + + +### Bug Fixes + +* **html:** Display all levels of parameter properties. ([#933](https://github.com/documentationjs/documentation/issues/933)) ([7a548eb](https://github.com/documentationjs/documentation/commit/7a548eb)) +* **package:** update github-slugger to version 1.2.0 ([2b74956](https://github.com/documentationjs/documentation/commit/2b74956)) +* Fix the split in HTML at 33/67% instead of calculating percentages ([#939](https://github.com/documentationjs/documentation/issues/939)) ([e4781eb](https://github.com/documentationjs/documentation/commit/e4781eb)), closes [#927](https://github.com/documentationjs/documentation/issues/927) + + + + +## [5.3.2](https://github.com/documentationjs/documentation/compare/v5.3.1...v5.3.2) (2017-09-15) + + +### Bug Fixes + +* special property names in flowtypes ([7fc6ca8](https://github.com/documentationjs/documentation/commit/7fc6ca8)) + + + + +## [5.3.1](https://github.com/documentationjs/documentation/compare/v5.3.0...v5.3.1) (2017-09-07) + + +### Bug Fixes + +* cover more hideconstructor cases ([5bdbf1f](https://github.com/documentationjs/documentation/commit/5bdbf1f)) +* Enable dynamicImport plugin to support import() syntax ([#903](https://github.com/documentationjs/documentation/issues/903)) ([b97241f](https://github.com/documentationjs/documentation/commit/b97241f)), closes [#902](https://github.com/documentationjs/documentation/issues/902) +* regression in toc causing crash ([125a577](https://github.com/documentationjs/documentation/commit/125a577)) + + + + +# [5.3.0](https://github.com/documentationjs/documentation/compare/v5.2.2...v5.3.0) (2017-09-04) + + +### Bug Fixes + +* [@name](https://github.com/name) tag disconnects comment ([#897](https://github.com/documentationjs/documentation/issues/897)) ([a04b6fd](https://github.com/documentationjs/documentation/commit/a04b6fd)) + + +### Features + +* groups in toc ([#895](https://github.com/documentationjs/documentation/issues/895)) ([c94412a](https://github.com/documentationjs/documentation/commit/c94412a)) +* implement [@hideconstructor](https://github.com/hideconstructor) ([#898](https://github.com/documentationjs/documentation/issues/898)) ([7a07d51](https://github.com/documentationjs/documentation/commit/7a07d51)) + + + + +## [5.2.2](https://github.com/documentationjs/documentation/compare/v5.2.1...v5.2.2) (2017-08-22) + + +### Bug Fixes + +* **$compile:** prevent babel from transpiling non-module scripts in default_theme's assets ([1286a1f](https://github.com/documentationjs/documentation/commit/1286a1f)) + + + + +## [5.2.1](https://github.com/documentationjs/documentation/compare/v5.2.0...v5.2.1) (2017-08-12) + + + + +# [5.2.0](https://github.com/documentationjs/documentation/compare/v5.1.1...v5.2.0) (2017-08-09) + + +### Bug Fixes + +* alphabetical sort and add flow notation to sort file ([#861](https://github.com/documentationjs/documentation/issues/861)) ([aa3496a](https://github.com/documentationjs/documentation/commit/aa3496a)), closes [#838](https://github.com/documentationjs/documentation/issues/838) +* make html and markdown second option optional ([#871](https://github.com/documentationjs/documentation/issues/871)) ([0324865](https://github.com/documentationjs/documentation/commit/0324865)), closes [#869](https://github.com/documentationjs/documentation/issues/869) + + +### Features + +* convert Flow's ThisTypeAnnotation to a doctrine NameExpression ([#870](https://github.com/documentationjs/documentation/issues/870)) ([23aa981](https://github.com/documentationjs/documentation/commit/23aa981)) + + + + +## [5.1.1](https://github.com/documentationjs/documentation/compare/v5.1.0...v5.1.1) (2017-08-04) + + +### Bug Fixes + +* **theme:** Remove dead stepsibling navigation code ([dccb151](https://github.com/documentationjs/documentation/commit/dccb151)) +* cli options should override package.json options ([ecf16bd](https://github.com/documentationjs/documentation/commit/ecf16bd)), closes [#845](https://github.com/documentationjs/documentation/issues/845) + + + + +# [5.1.0](https://github.com/documentationjs/documentation/compare/v5.0.1...v5.1.0) (2017-07-31) + + +### Bug Fixes + +* **scripts:** Remove changelog package.json task ([dddac19](https://github.com/documentationjs/documentation/commit/dddac19)) + + +### Features + +* **theme:** Flexible sidebar for default theme ([6509ae8](https://github.com/documentationjs/documentation/commit/6509ae8)) + + + + +## [5.0.1](https://github.com/documentationjs/documentation/compare/v5.0.0...v5.0.1) (2017-07-28) + + + + +# [5.0.0](https://github.com/documentationjs/documentation/compare/v4.0.0...v5.0.0) (2017-07-27) + + +### Reverts + +* **polyglot:** Remove polyglot mode ([5b373ff](https://github.com/documentationjs/documentation/commit/5b373ff)), closes [#850](https://github.com/documentationjs/documentation/issues/850) [#731](https://github.com/documentationjs/documentation/issues/731) [#702](https://github.com/documentationjs/documentation/issues/702) [#132](https://github.com/documentationjs/documentation/issues/132) + + +### BREAKING CHANGES + +* **polyglot:** I'd like to still support C++ and other languages in the future! But I'm much +happier doing so by separating the extraction & input phases to the degree that documentation.js can +read the output of another module that extracts JSDoc comments from C++ code, rather than having CPP +support in it. + + + + +# [4.0.0](https://github.com/documentationjs/documentation/compare/v4.0.0-rc.1...v4.0.0) (2017-07-27) + + +### Bug Fixes + +* **html output:** Fix links between navigation and items in HTML documentation ([5fb77bc](https://github.com/documentationjs/documentation/commit/5fb77bc)) +* **package:** update babel-generator to version 6.25.0 ([#804](https://github.com/documentationjs/documentation/issues/804)) ([65f5a37](https://github.com/documentationjs/documentation/commit/65f5a37)) +* **package:** update chalk to version 2.0.0 ([#833](https://github.com/documentationjs/documentation/issues/833)) ([2329db4](https://github.com/documentationjs/documentation/commit/2329db4)) +* **package:** update github-slugger to version 1.1.3 ([#793](https://github.com/documentationjs/documentation/issues/793)) ([74392cc](https://github.com/documentationjs/documentation/commit/74392cc)) +* Show () for callbacks ([61968c7](https://github.com/documentationjs/documentation/commit/61968c7)) +* **package:** update micromatch to version 3.0.0 ([#792](https://github.com/documentationjs/documentation/issues/792)) ([3f2bf90](https://github.com/documentationjs/documentation/commit/3f2bf90)) +* **package:** update remark to version 8.0.0 ([1ae8136](https://github.com/documentationjs/documentation/commit/1ae8136)) +* Fix filtering in the default theme ([473f317](https://github.com/documentationjs/documentation/commit/473f317)) +* Report nesting errors instead of throwing them as errors ([ea69608](https://github.com/documentationjs/documentation/commit/ea69608)), closes [#832](https://github.com/documentationjs/documentation/issues/832) +* **package:** update remark-html to version 6.0.1 ([#815](https://github.com/documentationjs/documentation/issues/815)) ([e472550](https://github.com/documentationjs/documentation/commit/e472550)) +* **package:** update vfile-reporter to version 4.0.0 ([a3e1fb8](https://github.com/documentationjs/documentation/commit/a3e1fb8)) + + + + +# [4.0.0-rc.1](https://github.com/documentationjs/documentation/compare/v4.0.0-rc.0...v4.0.0-rc.1) (2017-05-01) + + +### Bug Fixes + +* Infer parameters for classes from constructors ([355038d](https://github.com/documentationjs/documentation/commit/355038d)), closes [#689](https://github.com/documentationjs/documentation/issues/689) +* **document-exported:** Ensure that document-exported does not document constructors separately ([96a6d13](https://github.com/documentationjs/documentation/commit/96a6d13)) +* **flow:** Fix inference of Flow types with properties ([#751](https://github.com/documentationjs/documentation/issues/751)) ([7c00acc](https://github.com/documentationjs/documentation/commit/7c00acc)), closes [#749](https://github.com/documentationjs/documentation/issues/749) +* **params:** Parameters with default use = not ? ([3cc4426](https://github.com/documentationjs/documentation/commit/3cc4426)), closes [#737](https://github.com/documentationjs/documentation/issues/737) + + +### Features + +* **lint:** Identify explicit tags that don't match inference in lint stage ([ed5c2a0](https://github.com/documentationjs/documentation/commit/ed5c2a0)) + + + + +# [4.0.0-rc.0](https://github.com/documentationjs/documentation/compare/v4.0.0-beta.19...v4.0.0-rc.0) (2017-04-21) + + +### Bug Fixes + +* **html output:** Fix github links in HTML output ([#745](https://github.com/documentationjs/documentation/issues/745)) ([9554b2f](https://github.com/documentationjs/documentation/commit/9554b2f)), closes [#738](https://github.com/documentationjs/documentation/issues/738) +* **params:** added code path for type RestElement ([6961ee8](https://github.com/documentationjs/documentation/commit/6961ee8)) + + +### Code Refactoring + +* **nest:** Better nesting implementation ([#732](https://github.com/documentationjs/documentation/issues/732)) ([7374730](https://github.com/documentationjs/documentation/commit/7374730)) + + +### BREAKING CHANGES + +* **nest:** referencing inferred destructure params without +renaming them, like $0.x, from JSDoc comments will no longer +work. To reference them, instead add a param tag to name the +destructuring param, and then refer to members of that name. + +Before: + +```js +/** + * @param {number} $0.x a member of x + */ +function a({ x }) {} +``` + +After: + +```js +/** + * @param {Object} options + * @param {number} options.x a member of x + */ +function a({ x }) {} +``` + +* Address review comments + +* Reduce testing node requirement back down to 4 + +* Don't output empty properties, reduce diff noise + +* Rearrange and document params + +* Simplify param inference, update test fixtures. This is focused around Array destructuring: documenting destructured array elements with indices instead of names, because the names are purely internal details + +* Use temporary fork to get through blocker + + + + +# [4.0.0-beta.19](https://github.com/documentationjs/documentation/compare/v4.0.0-beta.18...v4.0.0-beta.19) (2017-04-10) + + +### Bug Fixes + +* **inference:** Refactor membership inference ([84c9215](https://github.com/documentationjs/documentation/commit/84c9215)) +* **inference:** Robust parsing for shorthand object methods ([802dc4c](https://github.com/documentationjs/documentation/commit/802dc4c)) +* **scopes:** Support inner scope ([#665](https://github.com/documentationjs/documentation/issues/665)) ([8cc34b6](https://github.com/documentationjs/documentation/commit/8cc34b6)) + + +### Features + +* **core:** Support Flow interface declarations ([e2915dc](https://github.com/documentationjs/documentation/commit/e2915dc)) +* **core:** Switch to Promises everywhere. Adopt Node v4 ES6 ([#648](https://github.com/documentationjs/documentation/issues/648)) ([631c692](https://github.com/documentationjs/documentation/commit/631c692)) +* **markdown:** Add `[@see](https://github.com/see)` tag output in Markdown ([#682](https://github.com/documentationjs/documentation/issues/682)) ([f07285a](https://github.com/documentationjs/documentation/commit/f07285a)) + + + + +# [4.0.0-beta.18](https://github.com/documentationjs/documentation/compare/v4.0.0-beta.17...v4.0.0-beta.18) (2016-12-29) + + +### Bug Fixes + +* **cli:** Fix error reporting in the CLI ([88c8f9a](https://github.com/documentationjs/documentation/commit/88c8f9a)) +* **markdown:** Start headings in Markdown at h2 (#644) ([2ae5d8f](https://github.com/documentationjs/documentation/commit/2ae5d8f)) + +### Features + +* **bin:** Support globs on windows and use smarter recursion (#629) ([cb8fdfa](https://github.com/documentationjs/documentation/commit/cb8fdfa)), closes [#607](https://github.com/documentationjs/documentation/issues/607) +* **markdown:** Add table of contents support for Markdown mode (#645) ([4c66fb1](https://github.com/documentationjs/documentation/commit/4c66fb1)) + +### Performance Improvements + +* **dependencies:** Move standard-changelog to devDependencies (#636) ([7a66b3f](https://github.com/documentationjs/documentation/commit/7a66b3f)) + + + + +# [4.0.0-beta.17](https://github.com/documentationjs/documentation/compare/v4.0.0-beta16...v4.0.0-beta.17) (2016-12-23) + +This release also fixes a mistake I was making with semver: pre-v4 beta +releases will be called `beta.17` and `beta.18` and so on, rather than +non-standard `beta16` without the `.`. + + +### Bug Fixes + +* **hierarchy:** collect events from static and instance members (#628) ([f1e0267](https://github.com/documentationjs/documentation/commit/f1e0267)), closes [#486](https://github.com/documentationjs/documentation/issues/486) + + + + +# [4.0.0-beta16](https://github.com/documentationjs/documentation/compare/v4.0.0-beta15...v4.0.0-beta16) (2016-12-07) + + +### Bug Fixes + +* **bin:** Remove dead code in documentation.js command (#627) ([ab16a20](https://github.com/documentationjs/documentation/commit/ab16a20)) +* **extractors:** Document export default value (#623) ([363a108](https://github.com/documentationjs/documentation/commit/363a108)), closes [#543](https://github.com/documentationjs/documentation/issues/543) +* **parser:** Avoid error about deoptimization on very large files (#621) ([846ab94](https://github.com/documentationjs/documentation/commit/846ab94)) + +### Features + +* **build:** load passed in config option (#625) ([89fb67f](https://github.com/documentationjs/documentation/commit/89fb67f)) +* **output:** Display type information for typedefs in Markdown and HTML ([8b04029](https://github.com/documentationjs/documentation/commit/8b04029)) + + + + # [4.0.0-beta15](https://github.com/documentationjs/documentation/compare/v4.0.0-beta14...v4.0.0-beta15) (2016-11-23) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 65c05c574..c06638aef 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,22 +1,76 @@ -# Contributor Code of Conduct +# Contributor Covenant Code of Conduct -As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment -* Publishing other's private information, such as physical or electronic addresses, without explicit permission -* Other unethical or unprofessional conduct. +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team. All complaints will be reviewed and +investigated and will result in a response that is deemed necessary and appropriate +to the circumstances. The project team is obligated to maintain confidentiality with +regard to the reporter of an incident. Further details of specific enforcement +policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. +## Attribution -This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. +[homepage]: https://www.contributor-covenant.org -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) \ No newline at end of file +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de4663c1e..2169a477e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ Declaring formal releases remains the prerogative of the project maintainer. This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change. -[this approach is totally cribbed from the excellent LevelUP project](https://github.com/rvagg/node-levelup/blob/master/CONTRIBUTING.md) +[this approach is totally cribbed from the excellent LevelUP project](https://github.com/Level/community/blob/master/CONTRIBUTING.md) ---- @@ -38,8 +38,7 @@ before merge. Release process: * Confirm that `master` passes CI tests -* Bump version in `package.json` -* Run `npm run changelog` -* Add updated CHANGELOG.md to master +* Run `npm run release` or in case it's a prerelease you'd run i.e. `npm run release -- --prerelease alpha` + * It will automatically update the version in package.json and make a git tag. * Push commits * npm publish diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..178189941 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,5 @@ +**If you're reporting a bug, please include _input code_, _output documentation_, +a description of what you expected to happen, and what happened instead.** + +* What version of documentation.js are you using?: +* How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): diff --git a/LICENSE b/LICENSE index 0604a1314..4a5ddc55b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2015, documentationjs <> +Copyright (c) 2025, documentationjs <> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -13,3 +13,40 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +-------------------------------------------------------------------------------- + +Contains sections of eslint + +ESLint +Copyright JS Foundation and other contributors, https://js.foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------------------- + +Contains sections of prettier + +Copyright © James Long and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 45b03dbff..90f636934 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,40 @@ -# documentation +

+ +

-[![Circle CI](https://circleci.com/gh/documentationjs/documentation/tree/master.svg?style=svg)](https://circleci.com/gh/documentationjs/documentation/tree/master) +

+ The documentation system for modern JavaScript +

+ +[![Circle CI](https://circleci.com/gh/documentationjs/documentation/tree/master.svg?style=shield)](https://circleci.com/gh/documentationjs/documentation/tree/master) [![npm version](https://badge.fury.io/js/documentation.svg)](http://badge.fury.io/js/documentation) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/documentationjs/documentation?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![David](https://david-dm.org/documentationjs/documentation.svg)](https://david-dm.org/documentationjs/documentation) -[![codecov.io](https://codecov.io/github/documentationjs/documentation/coverage.svg?branch=master)](https://codecov.io/github/documentationjs/documentation?branch=master) [![Inline docs](http://inch-ci.org/github/documentationjs/documentation.svg?branch=master&style=flat-square)](http://inch-ci.org/github/documentationjs/documentation) -A **documentation generation system** that's -_beautiful_ by default, _flexible_ across formats and styles, and -_powerful_ enough to support [JSDoc](http://usejsdoc.org/)'s advanced syntax. - -**ES5 and ES6 support of JavaScript, with support for other transpilers a possibility** - -Using [babel](https://babeljs.io/), we have support for a wide range -of [ES6 & ES7 features](https://github.com/lukehoban/es6features), as well -as [Flow](http://flowtype.org/) type annotations. - -**Powerful inference** - -By statically analyzing your JavaScript code, documentation.js can write -many parts of your documentation for you. It can infer parameter names -and types, class membership, return values from Flow types, and lots more. - -**Support for C++** - -You can use the `--polyglot` mode of documentationjs to document native node.js -modules in JSDoc _within the C++ code that implements the feature_. - -**Support for following dependency trees** - -Using [module-deps](https://github.com/substack/module-deps), `documentation` can -crawl `require()` graphs - pointing it to your app's `main` file will find all -referenced files and include all of their documentation. - -**GitHub Integration** +[:date: Current maintenance status](https://github.com/documentationjs/documentation/wiki/Current-maintenance-status) -The `--github` option automatically permalinks documentation to the exact -sections of code it refers to in a GitHub repository. - -**Gulp integration** - -The [gulp-documentation](https://github.com/documentationjs/gulp-documentation) project -lets you run `documentation` as a [Gulp](http://gulpjs.com/) build task. +- Supports modern JavaScript: ES5, ES2017, JSX, Vue and [Flow](https://flow.org/) type annotations. +- Infers parameters, types, membership, and more. Write less documentation: let the computer write it for you. +- Integrates with GitHub to link directly from documentation to the code it refers to. +- Customizable output: HTML, JSON, Markdown, and more ## Examples -* [HTML output with default template](http://documentation.js.org/html-example/) -* [Markdown](https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md) -* [JSON](http://documentation.js.org/html-example/index.json) +- [HTML output with default template](https://documentation.js.org/html-example/) +- [Markdown](https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md) +- [JSON](https://documentation.js.org/html-example/index.json) ## Documentation -* [Getting Started](docs/GETTING_STARTED.md): start here -* [Usage](docs/USAGE.md): how to use documentation.js -* [Recipes](docs/RECIPES.md): tricks for writing effective JSDoc docs -* [Node API](docs/NODE_API.md): documentation.js's self-generated documentation -* [Configuring documentation.js](docs/CONFIG.md) -* [FAQ](docs/FAQ.md) -* [Troubleshooting](docs/TROUBLESHOOTING.md) -* [Theming](docs/THEMING.md): tips for theming documentation output in HTML -* [See also](https://github.com/documentationjs/documentation/wiki/See-also): a list of projects similar to documentation.js +- [Getting Started](docs/GETTING_STARTED.md): start here +- [Usage](docs/USAGE.md): how to use documentation.js +- [Recipes](docs/RECIPES.md): tricks for writing effective JSDoc docs +- [Node API](docs/NODE_API.md): documentation.js's self-generated documentation +- [Configuring documentation.js](docs/CONFIG.md) +- [FAQ](docs/FAQ.md) +- [Troubleshooting](docs/TROUBLESHOOTING.md) +- [Theming](docs/THEMING.md): tips for theming documentation output in HTML +- [See also](https://github.com/documentationjs/documentation/wiki/See-also): a list of projects similar to documentation.js ## User Guide @@ -71,37 +45,42 @@ $ npm install -g documentation ``` This installs a command called `documentation` in your path, that you can -point at [JSDoc](http://usejsdoc.org/)-annotated source code to generate -human-readable documentation. First run `documentation` with the `-h` +point at [JSDoc](https://jsdoc.app/about-getting-started.html)-annotated source code to generate +human-readable documentation. First, run `documentation` with the `--help` option for help: ```sh -$ documentation -h -Usage: documentation [options] +Usage: + +# generate markdown docs for index.js and files it references +documentation build index.js -f md + +# generate html docs for all files in src, and include links to source files in github +documentation build src/** -f html --github -o docs + +# document index.js, ignoring any files it requires or imports +documentation build index.js -f md --shallow + +# validate JSDoc syntax in util.js +documentation lint util.js + +# update the API section of README.md with docs from index.js +documentation readme index.js --section=API + +# build docs for all values exported by index.js +documentation build --document-exported index.js + +# build html docs for a TypeScript project +documentation build index.ts --parse-extension ts -f html -o docs + +Commands: + build [input..] build documentation + lint [input..] check for common style and uniformity mistakes + readme [input..] inject documentation into your README.md Options: - --lint check output for common style and uniformity mistakes - [boolean] - -t, --theme specify a theme: this must be a valid theme module - -p, --private generate documentation tagged as private [boolean] - --version Show version number [boolean] - --name project name. by default, inferred from package.json - --project-version project version. by default, inferred from package.json - --shallow shallow mode turns off dependency resolution, only - processing the specified files (or the main script - specified in package.json) [boolean] [default: false] - --polyglot polyglot mode turns off dependency resolution and enables - multi-language support. use this to document c++ [boolean] - -g, --github infer links to github in documentation [boolean] - -o, --output output location. omit for stdout, otherwise is a filename - for single-file outputs and a directory name for multi-file - outputs like html [default: "stdout"] - -c, --config configuration file. an array defining explicit sort order - -h, --help Show help [boolean] - -f, --format [choices: "json", "md", "html"] [default: "json"] - -Examples: - documentation foo.js parse documentation in a given file + --version Show version number [boolean] + --help Show help [boolean] ``` ## [Contributing](CONTRIBUTING.md) @@ -110,9 +89,9 @@ _We have plenty of [issues](https://github.com/documentationjs/documentation/issues) that we'd love help with._ -* Robust and complete `JSDoc` support, including typedefs. -* Strong support for HTML and Markdown output -* Documentation coverage, statistics, and validation +- Robust and complete `JSDoc` support, including typedefs. +- Strong support for HTML and Markdown output +- Documentation coverage, statistics, and validation documentation is an OPEN Open Source Project. This means that: diff --git a/test/.eslintrc b/__tests__/.eslintrc similarity index 68% rename from test/.eslintrc rename to __tests__/.eslintrc index a30c31555..0a0dffb62 100644 --- a/test/.eslintrc +++ b/__tests__/.eslintrc @@ -2,5 +2,8 @@ "rules": { "valid-jsdoc": [0], "no-unused-vars": [0] + }, + "env": { + "jest": true } } diff --git a/__tests__/__snapshots__/bin-readme.js.snap b/__tests__/__snapshots__/bin-readme.js.snap new file mode 100644 index 000000000..6ce3ce9da --- /dev/null +++ b/__tests__/__snapshots__/bin-readme.js.snap @@ -0,0 +1,109 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`readme autodetection of different filenames updates readme.markdown 1`] = ` +"# A title + +# API + + + +### Table of Contents + +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) + +## foo + +A function with documentation. + +### Parameters + +* \`a\` {string} blah + +Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global\\\\_Objects/Number)** answer + +## bar + +A second function with docs + +### Parameters + +* \`b\` + +# Another section +" +`; + +exports[`readme command --readme-file 1`] = ` +"# A title + +# API + + + +### Table of Contents + +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) + +## foo + +A function with documentation. + +### Parameters + +* \`a\` {string} blah + +Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global\\\\_Objects/Number)** answer + +## bar + +A second function with docs + +### Parameters + +* \`b\` + +# Another section +" +`; + +exports[`readme command updates README.md 1`] = ` +"# A title + +# API + + + +### Table of Contents + +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) + +## foo + +A function with documentation. + +### Parameters + +* \`a\` {string} blah + +Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global\\\\_Objects/Number)** answer + +## bar + +A second function with docs + +### Parameters + +* \`b\` + +# Another section +" +`; diff --git a/__tests__/__snapshots__/bin.js.snap b/__tests__/__snapshots__/bin.js.snap new file mode 100644 index 000000000..ca6d4bbb8 --- /dev/null +++ b/__tests__/__snapshots__/bin.js.snap @@ -0,0 +1,2737 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`--config 1`] = ` +" + + + + documentation | Documentation + + + + + + + + +
+
+
+

documentation

+
+ +
+ +
+ +
+
+
+ + +
+ +

+ Highlighted section +

+ + +

The public key is a base64 encoded string of a protobuf containing an RSA DER +buffer. This uses a node buffer to pass the base64 encoded public key protobuf +to the multihash for ID generation.

+
{
+  \\"id\\": \\"Qma9T5YraSnpRDZqRR4krcSJabThc8nwZuJV3LercPHufi\\",
+  \\"privKey\\": \\"CAAS4AQwggJcAgEAAoGBAMBgbIqyOL26oV3nGPBYrdpbv..\\",
+  \\"pubKey\\": \\"CAASogEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMBgbIqyOL26oV3nGPBYrdpbvzCY...\\"
+}
+
+ + +
+ + + +
+ + +
+ +

+ Klass +

+ + +
+ + +

Creates a new Klass

+ +
new Klass(foo: any)
+ + +

+ Extends + + Stream.Writable + +

+ + + + + + + + + + +
Parameters
+
+ +
+
+ foo (any) + +
+ +
+ +
+ + + + + + + + + + + + + +
Static Members
+
+ +
+
+
+ + isClass(other, also) +
+
+
+
+ + + +

Decide whether an object is a Klass instance +This is a [klasssic]Klass +This is a [link to something that does not exist]DoesNot

+ +
isClass(other: Object, also: any): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ other (Object) + +
+ +
+ +
+
+ also (any) + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isWeird(other) +
+
+
+
+ + + +

A function that triggers the case where the autolinker doesn't find +the referenced class type

+ +
isWeird(other: Weird): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ other (Weird) + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isBuffer(buf, size) +
+
+
+
+ + + +

This method takes a Buffer object that will be linked to nodejs.org

+ +
isBuffer(buf: (Buffer | string), size: number): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ buf ((Buffer | string)) + +
+ +
+ +
+
+ size (number + = 0) + size + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isArrayOfBuffers(buffers) +
+
+
+
+ + + +

This method takes an array of buffers and counts them

+ +
isArrayOfBuffers(buffers: Array<Buffer>): number
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ buffers (Array<Buffer>) + some buffers + +
+ +
+ +
+ + + + + + +
Returns
+ number: + how many + + + + + + + + + + +
Example
+ + +
var k = new Klass();
+k.isArrayOfBuffers();
+ + + + + + + + + + +
+ +
+
+ +
+
+
+ + MAGIC_NUMBER +
+
+
+
+ + + +

A magic number that identifies this Klass.

+ +
MAGIC_NUMBER
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
Instance Members
+
+ +
+
+
+ + getFoo() +
+
+
+
+ + + +

Get this Klass's foo

+ +
getFoo(): Number
+ + + + + + + + + + + + + + + + +
Returns
+ Number: + foo + + + + + + + + + + +
Example
+ +

this shows you how to getFoo

+

+
var x = foo.getFoo();
+ + + + + + + + + + +
+ +
+
+ +
+
+
+ + withOptions(options, otherOptions) +
+
+
+
+ + + +

A function with an options parameter

+ +
withOptions(options: Object, otherOptions: number?)
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ options (Object) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
options.foo string +
options.bar number +
+ +
+ +
+
+ otherOptions (number?) + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + withDeepOptions(options) +
+
+
+
+ + + +

A function with a deep options parameter

+ +
withDeepOptions(options: Object)
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ options (Object) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
options.foo string +
options.bar Object +
options.bar.buz string +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
Events
+
+ +
+
+
+ + event +
+
+
+
+ + + +

Klass event

+ +
event
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + +
+ + + + +
+ + +
+ +

+ CustomError +

+ + +
+ + +

a typedef with nested properties

+ +
CustomError
+ + + + + + + + + + + + + +
Properties
+
+ +
+ error (object) + : An error + + +
    + +
  • error.code string + +

    The error's code

    +
  • + +
  • error.description string + +

    The error's description

    +
  • + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar +

+ + +
+ + +

Get an instance of Klass. Will make +a klass instance multiword, +like a klass

+ +
bar(): Klass
+ + + + + + + + + + + + + + + + +
Returns
+ Klass: + that class + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar2 +

+ + +
+ + +

Rest property function

+ +
bar2(toys: ...Number): undefined
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ toys (...Number) + +
+ +
+ +
+ + + + + + +
Returns
+ undefined: + nothing + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar3 +

+ + +
+ + +

Get an instance of Klass. Will make +a klass instance multiword, +like a klass. This needs a number input.

+ +
bar3(): undefined
+ + + + + + + + + + + + + + + + +
Returns
+ undefined: + nothing + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ Foo +

+ + +
+ + +

This is Foo

+ +
new Foo()
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Instance Members
+
+ +
+
+
+ + bar +
+
+
+
+ + + +

This is bar

+ +
bar
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + + + +
+ + +
+ +

+ Foobar +

+ + +
+ + +

This is Foobar +must have a distinct id from Foo.bar

+ +
new Foobar()
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Instance Members
+
+ +
+
+
+ + bar +
+
+
+
+ + + +

This is bar

+ +
bar
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + + + +
+ + +
+ +

+ customStreams +

+ + +
+ + +

I am the container of stream types

+ +
customStreams
+ + + + + + + + + + + + + + + + + + + + + + + +
Static Members
+
+ +
+
+
+ + new passthrough() +
+
+
+
+ + + +

I am a passthrough stream that belongs to customStreams

+ +
new passthrough()
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + + + +
+ + + + +
+ + +
+ +

+ tableObj +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
Col 1Col 2Col 3
Dat 1Dat 2Dat 3
Dat 4Dat 5Dat 6
+ +
tableObj
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + + +" +`; + +exports[`accepts config file 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "file": "[path]", + "loc": Object { + "end": Object { + "column": 2, + "index": 150, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 102, + "line": 11, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Bananas are yellow", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 101, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 72, + "line": 8, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "bananas", + "namespace": "bananas", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "bananas", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "file": "[path]", + "loc": Object { + "end": Object { + "column": 2, + "index": 232, + "line": 20, + }, + "start": Object { + "column": 0, + "index": 183, + "line": 18, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Carrots are awesome", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 182, + "line": 17, + }, + "start": Object { + "column": 0, + "index": 152, + "line": 15, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "carrots", + "namespace": "carrots", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "carrots", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "file": "[path]", + "loc": Object { + "end": Object { + "column": 2, + "index": 70, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 26, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Apples are red", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 25, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "apples", + "namespace": "apples", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "apples", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`build --document-exported 1`] = ` +" + +### Table of Contents + +- [z][1] + - [zMethod][2] +- [x][3] + - [Parameters][4] +- [Class][5] + - [Parameters][6] + - [classMethod][7] + - [classGetter][8] + - [classSetter][9] + - [Parameters][10] + - [staticMethod][11] + - [staticGetter][12] + - [staticSetter][13] + - [Parameters][14] +- [T5][15] +- [y2Default][16] +- [y4][17] + - [Parameters][18] +- [object][19] + - [method][20] + - [getter][21] + - [setter][22] + - [Parameters][23] + - [prop][24] + - [func][25] +- [f1][26] +- [f3][27] +- [T][28] +- [T2][29] +- [T4][30] +- [f4][31] + - [Parameters][32] +- [o1][33] + - [om1][34] +- [f5][35] + - [Parameters][36] +- [o2][37] + - [om2][38] + +## z + +### zMethod + +## x + +### Parameters + +- \`yparam\` + +## Class + +### Parameters + +- \`a\` **[string][39]** + +### classMethod + +### classGetter + +### classSetter + +#### Parameters + +- \`v\` + +### staticMethod + +### staticGetter + +### staticSetter + +#### Parameters + +- \`v\` + +## T5 + +Type: [boolean][40] + +## y2Default + +## y4 + +Description of y3 + +### Parameters + +- \`p\` **[number][41]** + +Returns **void** + +## object + +### method + +### getter + +### setter + +#### Parameters + +- \`v\` + +### prop + +### func + +## f1 + +## f3 + +## T + +Type: [number][41] + +## T2 + +Type: [string][39] + +## T4 + +Type: [string][39] + +## f4 + +### Parameters + +- \`x\` **X** + +## o1 + +### om1 + +## f5 + +f5 comment + +### Parameters + +- \`y\` **Y** + +## o2 + +### om2 + +[1]: #z + +[2]: #zmethod + +[3]: #x + +[4]: #parameters + +[5]: #class + +[6]: #parameters-1 + +[7]: #classmethod + +[8]: #classgetter + +[9]: #classsetter + +[10]: #parameters-2 + +[11]: #staticmethod + +[12]: #staticgetter + +[13]: #staticsetter + +[14]: #parameters-3 + +[15]: #t5 + +[16]: #y2default + +[17]: #y4 + +[18]: #parameters-4 + +[19]: #object + +[20]: #method + +[21]: #getter + +[22]: #setter + +[23]: #parameters-5 + +[24]: #prop + +[25]: #func + +[26]: #f1 + +[27]: #f3 + +[28]: #t + +[29]: #t2 + +[30]: #t4 + +[31]: #f4 + +[32]: #parameters-6 + +[33]: #o1 + +[34]: #om1 + +[35]: #f5 + +[36]: #parameters-7 + +[37]: #o2 + +[38]: #om2 + +[39]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[40]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[41]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`build GFM (e.g. markdown tables) for -f md 1`] = ` +" + +### Table of Contents + +* [Klass][1] + * [Parameters][2] + * [getFoo][3] + * [Examples][4] + * [withOptions][5] + * [Parameters][6] + * [withDeepOptions][7] + * [Parameters][8] + * [isClass][9] + * [Parameters][10] + * [isWeird][11] + * [Parameters][12] + * [isBuffer][13] + * [Parameters][14] + * [isArrayOfBuffers][15] + * [Parameters][16] + * [Examples][17] + * [MAGIC\\\\_NUMBER][18] + * [event][19] +* [CustomError][20] + * [Properties][21] +* [bar][22] +* [bar2][23] + * [Parameters][24] +* [bar3][25] +* [Foo][26] + * [bar][27] +* [Foobar][28] + * [bar][29] +* [customStreams][30] + * [passthrough][31] +* [tableObj][32] + +## Klass + +**Extends Stream.Writable** + +Creates a new Klass + +### Parameters + +* \`foo\` + +### getFoo + +Get this Klass's foo + +#### Examples + +this shows you how to getFoo + +\`\`\`javascript +var x = foo.getFoo(); +\`\`\` + +Returns **[Number][33]** foo + +### withOptions + +A function with an options parameter + +#### Parameters + +* \`options\` **[Object][34]** + + * \`options.foo\` **[string][35]** + * \`options.bar\` **[number][33]** +* \`otherOptions\` **[number][33]?** + +### withDeepOptions + +A function with a deep options parameter + +#### Parameters + +* \`options\` **[Object][34]** + + * \`options.foo\` **[string][35]** + * \`options.bar\` **[Object][34]** + + * \`options.bar.buz\` **[string][35]** + +### isClass + +Decide whether an object is a Klass instance +This is a \\\\[klasssic][Klass][1] +This is a \\\\[link to something that does not exist][DoesNot][36] + +#### Parameters + +* \`other\` **[Object][34]** +* \`also\` **any** + +Returns **[boolean][37]** whether the other thing is a Klass + +### isWeird + +A function that triggers the case where the autolinker doesn't find +the referenced class type + +#### Parameters + +* \`other\` **Weird** + +Returns **[boolean][37]** whether the other thing is a Klass + +### isBuffer + +This method takes a Buffer object that will be linked to nodejs.org + +#### Parameters + +* \`buf\` **([Buffer][38] | [string][35])** +* \`size\` **[number][33]** size (optional, default \`0\`) + +Returns **[boolean][37]** whether the other thing is a Klass + +### isArrayOfBuffers + +This method takes an array of buffers and counts them + +#### Parameters + +* \`buffers\` **[Array][39]<[Buffer][38]>** some buffers + +#### Examples + +\`\`\`javascript +var k = new Klass(); +k.isArrayOfBuffers(); +\`\`\` + +Returns **[number][33]** how many + +### MAGIC\\\\_NUMBER + +A magic number that identifies this Klass. + +### event + +Klass event + +## CustomError + +a typedef with nested properties + +### Properties + +* \`error\` **[object][34]** An error + + * \`error.code\` **[string][35]** The error's code + * \`error.description\` **[string][35]** The error's description + +## bar + +Get an instance of [Klass][1]. Will make +a [klass instance multiword][1], +like a [klass][1] + +Returns **[Klass][1]** that class + +## bar2 + +Rest property function + +### Parameters + +* \`toys\` **...[Number][33]** + +Returns **[undefined][40]** nothing + +## bar3 + +Get an instance of [Klass][1]. Will make +a [klass instance multiword][1], +like a [klass][1]. This needs a [number][33] input. + +Returns **[undefined][40]** nothing + +## Foo + +This is Foo + +### bar + +This is bar + +## Foobar + +This is Foobar +must have a distinct id from Foo.bar + +### bar + +This is bar + +## customStreams + +I am the container of stream types + +### passthrough + +I am a passthrough stream that belongs to customStreams + +## tableObj + +| Col 1 | Col 2 | Col 3 | +| ----- | ----- | ----- | +| Dat 1 | Dat 2 | Dat 3 | +| Dat 4 | Dat 5 | Dat 6 | + +[1]: #klass + +[2]: #parameters + +[3]: #getfoo + +[4]: #examples + +[5]: #withoptions + +[6]: #parameters-1 + +[7]: #withdeepoptions + +[8]: #parameters-2 + +[9]: #isclass + +[10]: #parameters-3 + +[11]: #isweird + +[12]: #parameters-4 + +[13]: #isbuffer + +[14]: #parameters-5 + +[15]: #isarrayofbuffers + +[16]: #parameters-6 + +[17]: #examples-1 + +[18]: #magic_number + +[19]: #event + +[20]: #customerror + +[21]: #properties + +[22]: #bar + +[23]: #bar2 + +[24]: #parameters-7 + +[25]: #bar3 + +[26]: #foo + +[27]: #bar-1 + +[28]: #foobar + +[29]: #bar-2 + +[30]: #customstreams + +[31]: #passthrough + +[32]: #tableobj + +[33]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[34]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[35]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[36]: DoesNot + +[37]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[38]: https://nodejs.org/api/buffer.html + +[39]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array + +[40]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined +" +`; + +exports[`lint command generates lint output 1`] = `""`; + +exports[`should use browser resolve 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "file": "[path]", + "loc": Object { + "end": Object { + "column": 2, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "test", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "examples": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "index", + "namespace": "index", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "index", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + }, +] +`; + +exports[`should use node resolve 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "file": "[path]", + "loc": Object { + "end": Object { + "column": 2, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "test", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "examples": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "index", + "namespace": "index", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "index", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "file": "[path]", + "loc": Object { + "end": Object { + "column": 2, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "test", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "examples": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "node", + "namespace": "node", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "node", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + }, +] +`; diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap new file mode 100644 index 000000000..51d8397af --- /dev/null +++ b/__tests__/__snapshots__/index.js.snap @@ -0,0 +1,130 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`build 1`] = ` +Array [ + Object { + "augments": Array [], + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "hi", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": SourceLocation { + "end": Position { + "column": 9, + "index": 9, + "line": 1, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "name", + "namespace": "name", + "params": Array [], + "path": Array [ + Object { + "kind": undefined, + "name": "name", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`build 2`] = ` +" + +## name + +hi +" +`; + +exports[`build 3`] = ` +"[ + { + \\"description\\": { + \\"type\\": \\"root\\", + \\"children\\": [ + { + \\"type\\": \\"paragraph\\", + \\"children\\": [ + { + \\"type\\": \\"text\\", + \\"value\\": \\"hi\\" + } + ] + } + ] + }, + \\"tags\\": [], + \\"loc\\": { + \\"start\\": { + \\"line\\": 1, + \\"column\\": 0, + \\"index\\": 0 + }, + \\"end\\": { + \\"line\\": 1, + \\"column\\": 9, + \\"index\\": 9 + } + }, + \\"augments\\": [], + \\"examples\\": [], + \\"implements\\": [], + \\"params\\": [], + \\"properties\\": [], + \\"returns\\": [], + \\"sees\\": [], + \\"throws\\": [], + \\"todos\\": [], + \\"yields\\": [], + \\"name\\": \\"name\\", + \\"members\\": { + \\"global\\": [], + \\"inner\\": [], + \\"instance\\": [], + \\"events\\": [], + \\"static\\": [] + }, + \\"path\\": [ + { + \\"name\\": \\"name\\" + } + ], + \\"namespace\\": \\"name\\" + } +]" +`; diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap new file mode 100644 index 000000000..d5bc9820a --- /dev/null +++ b/__tests__/__snapshots__/test.js.snap @@ -0,0 +1,32383 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Check that external modules could parse as input 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 1, + "index": 147, + "line": 10, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 113, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "I am in ", + }, + Object { + "type": "inlineCode", + "value": "external.input.js", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 112, + "line": 7, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 73, + "line": 5, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 2, + "index": 195, + "line": 10, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 118, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 117, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 38, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "main", + "namespace": "main", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "main", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 2, + "index": 144, + "line": 8, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 80, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 79, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "index", + "namespace": "index", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "index", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`Use Source attribute only 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 1, + "index": 222, + "line": 18, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 87, + "line": 6, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This Vue Component is a test", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "message": "could not determine @name for hierarchy", + }, + ], + "examples": Array [], + "implements": Array [], + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 86, + "line": 5, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 1, + "line": 2, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "", + "namespace": "", + "params": Array [], + "path": Array [ + Object { + "kind": undefined, + "name": "", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "vue-tested component", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "vue-tested", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "vue-tested component", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "vue-tested", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 5, + "index": 216, + "line": 16, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 4, + "index": 161, + "line": 13, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a number", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "commentLineNumber": 0, + "message": "@memberof reference to .props not found", + }, + ], + "examples": Array [], + "implements": Array [], + "loc": SourceLocation { + "end": Position { + "column": 7, + "index": 156, + "line": 12, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 4, + "index": 121, + "line": 10, + }, + }, + "memberof": ".props", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "myNumber", + "namespace": ".myNumber", + "params": Array [], + "path": Array [ + Object { + "kind": undefined, + "name": "myNumber", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`Vue file 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 1, + "index": 218, + "line": 20, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 88, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This Vue Component is a test", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 87, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 2, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "vue.input", + "namespace": "vue.input", + "params": Array [], + "path": Array [ + Object { + "kind": undefined, + "name": "vue.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "vue-tested component", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "vue-tested", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "vue-tested component", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "vue-tested", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 1, + "index": 216, + "line": 19, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 119, + "line": 10, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "props", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "commentLineNumber": 0, + "message": "@memberof reference to vue.input not found", + }, + ], + "examples": Array [], + "implements": Array [], + "loc": SourceLocation { + "end": Position { + "column": 12, + "index": 118, + "line": 9, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 106, + "line": 9, + }, + }, + "memberof": "vue.input", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 214, + "line": 18, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 2, + "index": 165, + "line": 15, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a number", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": SourceLocation { + "end": Position { + "column": 5, + "index": 162, + "line": 14, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 2, + "index": 131, + "line": 12, + }, + }, + "memberof": "vue.input.props", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "myNumber", + "namespace": ".props.myNumber", + "params": Array [], + "path": Array [ + Object { + "kind": undefined, + "name": "props", + "scope": "static", + }, + Object { + "kind": undefined, + "name": "myNumber", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "props", + "namespace": ".props", + "params": Array [], + "path": Array [ + Object { + "kind": undefined, + "name": "props", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`Vue file 2`] = `Array []`; + +exports[`config 1`] = ` +" + +## MyClass + +This is my class, a demo thing. + +### Properties + +* \`howMany\` **[number][1]** how many things it contains + +### getFoo + +Get the number 42 + +#### Parameters + +* \`getIt\` **[boolean][2]** whether to get the number + +Returns **[number][1]** forty-two + +### getUndefined + +Get undefined + +Returns **[undefined][3]** does not return anything. + +## Hello + +World + +[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined +" +`; + +exports[`config with nested sections 1`] = ` +" + +## Alpha + + + +### third + +This function is third + +### first + +This function is first + +### first + +forgot a memberof here... sure hope that doesn't crash anything! + +## Bravo + +Contains a subsection! + +### Charlie + +Second is in here + +#### second + +This class has some members + +##### foo + +second::foo + +###### Parameters + +* \`pork\` + +##### bar + +second::bar + +###### Parameters + +* \`beans\` +* \`rice\` + +## AClass + +### second + +shares a name with a top level item referenced in the TOC... sure hope +that doesn't crash anything! +" +`; + +exports[`git option 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "github": Object { + "path": "[github]", + "url": "[github]", + }, + "loc": SourceLocation { + "end": Position { + "column": 2, + "index": 144, + "line": 8, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 80, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 79, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "simple.input", + "namespace": "simple.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "simple.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`git option 2`] = ` +" + +## simple.input + +[\\\\[github\\\\]:5-8][1] + +This function returns the number one. + +Returns **[number][2]** numberone + +[1]: [github] \\"Source code on GitHub\\" + +[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`highlightAuto md output 1`] = ` +" + +## multilanguage.input + +**Extends Foo, Bar** + +This function returns the number one. + +### Examples + +\`\`\`js +var myFoo = new Foo('[data-foo]'); +myFoo.foo(42); +\`\`\` + +\`\`\`html +

Data-Foo Element in the dom

+\`\`\` + +\`\`\`css +[data-foo] { + background-color: red; +} +\`\`\` + +* Throws **[Error][1]** if you give it something +* Throws **[TypeError][2]** if you give it something else + +Returns **[Number][3]** numberone + +[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error + +[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypeError + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`html nested.input.js 1`] = ` +" + + + + | Documentation + + + + + + + + +
+
+
+

documentation

+
+ +
+ +
+ +
+
+
+ + +
+ + +
+ +

+ Klass +

+ + +
+ + +

Creates a new Klass

+ +
new Klass(foo: any)
+ + +

+ Extends + + Stream.Writable + +

+ + + + + + + + + + +
Parameters
+
+ +
+
+ foo (any) + +
+ +
+ +
+ + + + + + + + + + + + + +
Static Members
+
+ +
+
+
+ + isClass(other, also) +
+
+
+
+ + + +

Decide whether an object is a Klass instance +This is a [klasssic]Klass +This is a [link to something that does not exist]DoesNot

+ +
isClass(other: Object, also: any): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ other (Object) + +
+ +
+ +
+
+ also (any) + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isWeird(other) +
+
+
+
+ + + +

A function that triggers the case where the autolinker doesn't find +the referenced class type

+ +
isWeird(other: Weird): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ other (Weird) + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isBuffer(buf, size) +
+
+
+
+ + + +

This method takes a Buffer object that will be linked to nodejs.org

+ +
isBuffer(buf: (Buffer | string), size: number): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ buf ((Buffer | string)) + +
+ +
+ +
+
+ size (number + = 0) + size + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isArrayOfBuffers(buffers) +
+
+
+
+ + + +

This method takes an array of buffers and counts them

+ +
isArrayOfBuffers(buffers: Array<Buffer>): number
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ buffers (Array<Buffer>) + some buffers + +
+ +
+ +
+ + + + + + +
Returns
+ number: + how many + + + + + + + + + + +
Example
+ + +
var k = new Klass();
+k.isArrayOfBuffers();
+ + + + + + + + + + +
+ +
+
+ +
+
+
+ + MAGIC_NUMBER +
+
+
+
+ + + +

A magic number that identifies this Klass.

+ +
MAGIC_NUMBER
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
Instance Members
+
+ +
+
+
+ + getFoo() +
+
+
+
+ + + +

Get this Klass's foo

+ +
getFoo(): Number
+ + + + + + + + + + + + + + + + +
Returns
+ Number: + foo + + + + + + + + + + +
Example
+ +

this shows you how to getFoo

+

+
var x = foo.getFoo();
+ + + + + + + + + + +
+ +
+
+ +
+
+
+ + withOptions(options, otherOptions) +
+
+
+
+ + + +

A function with an options parameter

+ +
withOptions(options: Object, otherOptions: number?)
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ options (Object) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
options.foo string +
options.bar number +
+ +
+ +
+
+ otherOptions (number?) + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + withDeepOptions(options) +
+
+
+
+ + + +

A function with a deep options parameter

+ +
withDeepOptions(options: Object)
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ options (Object) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
options.foo string +
options.bar Object +
options.bar.buz string +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
Events
+
+ +
+
+
+ + event +
+
+
+
+ + + +

Klass event

+ +
event
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + +
+ + + + +
+ + +
+ +

+ CustomError +

+ + +
+ + +

a typedef with nested properties

+ +
CustomError
+ + + + + + + + + + + + + +
Properties
+
+ +
+ error (object) + : An error + + +
    + +
  • error.code string + +

    The error's code

    +
  • + +
  • error.description string + +

    The error's description

    +
  • + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar +

+ + +
+ + +

Get an instance of Klass. Will make +a klass instance multiword, +like a klass

+ +
bar(): Klass
+ + + + + + + + + + + + + + + + +
Returns
+ Klass: + that class + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar2 +

+ + +
+ + +

Rest property function

+ +
bar2(toys: ...Number): undefined
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ toys (...Number) + +
+ +
+ +
+ + + + + + +
Returns
+ undefined: + nothing + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar3 +

+ + +
+ + +

Get an instance of Klass. Will make +a klass instance multiword, +like a klass. This needs a number input.

+ +
bar3(): undefined
+ + + + + + + + + + + + + + + + +
Returns
+ undefined: + nothing + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ Foo +

+ + +
+ + +

This is Foo

+ +
new Foo()
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Instance Members
+
+ +
+
+
+ + bar +
+
+
+
+ + + +

This is bar

+ +
bar
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + + + +
+ + +
+ +

+ Foobar +

+ + +
+ + +

This is Foobar +must have a distinct id from Foo.bar

+ +
new Foobar()
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Instance Members
+
+ +
+
+
+ + bar +
+
+
+
+ + + +

This is bar

+ +
bar
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + + + +
+ + +
+ +

+ customStreams +

+ + +
+ + +

I am the container of stream types

+ +
customStreams
+ + + + + + + + + + + + + + + + + + + + + + + +
Static Members
+
+ +
+
+
+ + new passthrough() +
+
+
+
+ + + +

I am a passthrough stream that belongs to customStreams

+ +
new passthrough()
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + + + +
+ + + + +
+ + +
+ +

+ tableObj +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
Col 1Col 2Col 3
Dat 1Dat 2Dat 3
Dat 4Dat 5Dat 6
+ +
tableObj
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + + + +" +`; + +exports[`multi-file input 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 1, + "index": 245, + "line": 13, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 180, + "line": 10, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number plus two.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [ + Object { + "description": "var result = returnTwo(4); +// result is 6", + }, + ], + "implements": Array [], + "kind": "function", + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 179, + "line": 9, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "returnTwo", + "namespace": "returnTwo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the number", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "a", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "returnTwo", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numbertwo", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "the number", + "lineNumber": 3, + "name": "a", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + Object { + "description": "numbertwo", + "lineNumber": 4, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + Object { + "description": "var result = returnTwo(4); +// result is 6", + "lineNumber": 5, + "title": "example", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": SourceLocation { + "end": Position { + "column": 2, + "index": 144, + "line": 8, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 80, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": SourceLocation { + "end": Position { + "column": 3, + "index": 79, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "simple.input", + "namespace": "simple.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "simple.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs boolean-literal-type.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 72, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 7, + "line": 2, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 6, + "index": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "f", + "namespace": "f", + "params": Array [ + Object { + "lineNumber": 2, + "name": "t", + "title": "param", + "type": Object { + "type": "BooleanLiteralType", + "value": true, + }, + }, + Object { + "lineNumber": 2, + "name": "f", + "title": "param", + "type": Object { + "type": "BooleanLiteralType", + "value": false, + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "f", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "title": "returns", + "type": Object { + "elements": Array [ + Object { + "type": "BooleanLiteralType", + "value": true, + }, + Object { + "type": "BooleanLiteralType", + "value": false, + }, + ], + "type": "ArrayType", + }, + }, + ], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs boolean-literal-type.input.js markdown 1`] = ` +" + +### Table of Contents + +* [f][1] + * [Parameters][2] + +## f + +### Parameters + +* \`t\` **\`true\`** +* \`f\` **\`false\`** + +Returns **\\\\[\`true\`, \`false\`]** + +[1]: #f + +[2]: #parameters +" +`; + +exports[`outputs boolean-literal-type.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "t", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "true", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "f", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "false", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "[", + }, + Object { + "type": "inlineCode", + "value": "true", + }, + Object { + "type": "text", + "value": ", ", + }, + Object { + "type": "inlineCode", + "value": "false", + }, + Object { + "type": "text", + "value": "]", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs class.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 190, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 148, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my class, a demo thing.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [ + Object { + "description": null, + "lineNumber": 3, + "name": "MyInterface", + "title": "implements", + "type": Object { + "name": "MyInterface", + "type": "NameExpression", + }, + }, + ], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 147, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 376, + "line": 18, + }, + "start": Object { + "column": 0, + "index": 304, + "line": 16, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get the number 42", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 303, + "line": 15, + }, + "start": Object { + "column": 0, + "index": 192, + "line": 11, + }, + }, + "memberof": "MyClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "getFoo", + "namespace": "MyClass#getFoo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "whether to get the number", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "getIt", + "title": "param", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "MyClass", + }, + Object { + "kind": "function", + "name": "getFoo", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "forty-two", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": "whether to get the number", + "lineNumber": 2, + "name": "getIt", + "title": "param", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + Object { + "description": "forty-two", + "lineNumber": 3, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 47, + "index": 500, + "line": 24, + }, + "start": Object { + "column": 0, + "index": 453, + "line": 24, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get undefined", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 452, + "line": 23, + }, + "start": Object { + "column": 0, + "index": 378, + "line": 20, + }, + }, + "memberof": "MyClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "getUndefined", + "namespace": "MyClass#getUndefined", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "MyClass", + }, + Object { + "kind": "function", + "name": "getUndefined", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "does not return anything.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "type": "UndefinedLiteral", + }, + }, + ], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": "does not return anything.", + "lineNumber": 2, + "title": "returns", + "type": Object { + "type": "UndefinedLiteral", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "MyClass", + "namespace": "MyClass", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "MyClass", + }, + ], + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "how many things it contains", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "howMany", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "MyClass", + "title": "class", + "type": null, + }, + Object { + "description": null, + "lineNumber": 3, + "name": "MyInterface", + "title": "implements", + "type": Object { + "name": "MyInterface", + "type": "NameExpression", + }, + }, + Object { + "description": "how many things it contains", + "lineNumber": 4, + "name": "howMany", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs class.input.js markdown 1`] = ` +" + +### Table of Contents + +* [MyClass][1] + * [Properties][2] + * [getFoo][3] + * [Parameters][4] + * [getUndefined][5] + +## MyClass + +This is my class, a demo thing. + +### Properties + +* \`howMany\` **[number][6]** how many things it contains + +### getFoo + +Get the number 42 + +#### Parameters + +* \`getIt\` **[boolean][7]** whether to get the number + +Returns **[number][6]** forty-two + +### getUndefined + +Get undefined + +Returns **[undefined][8]** does not return anything. + +[1]: #myclass + +[2]: #properties + +[3]: #getfoo + +[4]: #parameters + +[5]: #getundefined + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined +" +`; + +exports[`outputs class.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "MyClass", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my class, a demo thing.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Properties", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "howMany", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "how many things it contains", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "getFoo", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get the number 42", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "getIt", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "whether to get the number", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "forty-two", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "getUndefined", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get undefined", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "undefined", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "does not return anything.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined", + }, + ], + "type": "root", +} +`; + +exports[`outputs default-export-function.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 92, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 16, + "line": 2, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "i am foo", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 15, + "index": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "default-export-function.input", + "namespace": "default-export-function.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "default-export-function.input", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 22, + "index": 90, + "line": 4, + }, + "start": Object { + "column": 2, + "index": 70, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "i am foo's son", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "commentLineNumber": 0, + "message": "@memberof reference to default-export-function.input not found", + }, + ], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 23, + "index": 67, + "line": 3, + }, + "start": Object { + "column": 2, + "index": 46, + "line": 3, + }, + }, + "memberof": "default-export-function.input", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "bar", + "namespace": ".bar", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "bar", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs default-export-function.input.js markdown 1`] = ` +" + +### Table of Contents + +* [default-export-function.input][1] +* [bar][2] + +## default-export-function.input + +i am foo + +## bar + +i am foo's son + +[1]: #default-export-functioninput + +[2]: #bar +" +`; + +exports[`outputs default-export-function.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "default-export-function.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "i am foo", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "bar", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "i am foo's son", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs document-exported.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 28, + "index": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 28, + "index": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "x", + "namespace": "x", + "params": Array [ + Object { + "lineNumber": 1, + "name": "yparam", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "x", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 41, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 1, + "index": 41, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 14, + "index": 39, + "line": 2, + }, + "start": Object { + "column": 2, + "index": 27, + "line": 2, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 14, + "index": 39, + "line": 2, + }, + "start": Object { + "column": 2, + "index": 27, + "line": 2, + }, + }, + "memberof": "z", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "zMethod", + "namespace": "z#zMethod", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "z", + }, + Object { + "kind": "function", + "name": "zMethod", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "z", + "namespace": "z", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "z", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 246, + "line": 11, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 3, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 1, + "index": 246, + "line": 11, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 18, + "index": 107, + "line": 5, + }, + "start": Object { + "column": 2, + "index": 91, + "line": 5, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 18, + "index": 107, + "line": 5, + }, + "start": Object { + "column": 2, + "index": 91, + "line": 5, + }, + }, + "memberof": "Class", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "classMethod", + "namespace": "Class#classMethod", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Class", + }, + Object { + "kind": "function", + "name": "classMethod", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 22, + "index": 130, + "line": 6, + }, + "start": Object { + "column": 2, + "index": 110, + "line": 6, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 22, + "index": 130, + "line": 6, + }, + "start": Object { + "column": 2, + "index": 110, + "line": 6, + }, + }, + "memberof": "Class", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "classGetter", + "namespace": "Class#classGetter", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Class", + }, + Object { + "kind": "member", + "name": "classGetter", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 23, + "index": 154, + "line": 7, + }, + "start": Object { + "column": 2, + "index": 133, + "line": 7, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 23, + "index": 154, + "line": 7, + }, + "start": Object { + "column": 2, + "index": 133, + "line": 7, + }, + }, + "memberof": "Class", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "classSetter", + "namespace": "Class#classSetter", + "params": Array [ + Object { + "lineNumber": 7, + "name": "v", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Class", + }, + Object { + "kind": "member", + "name": "classSetter", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 26, + "index": 181, + "line": 8, + }, + "start": Object { + "column": 2, + "index": 157, + "line": 8, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 26, + "index": 181, + "line": 8, + }, + "start": Object { + "column": 2, + "index": 157, + "line": 8, + }, + }, + "memberof": "Class", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "staticMethod", + "namespace": "Class.staticMethod", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Class", + }, + Object { + "kind": "function", + "name": "staticMethod", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 30, + "index": 212, + "line": 9, + }, + "start": Object { + "column": 2, + "index": 184, + "line": 9, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 30, + "index": 212, + "line": 9, + }, + "start": Object { + "column": 2, + "index": 184, + "line": 9, + }, + }, + "memberof": "Class", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "staticGetter", + "namespace": "Class.staticGetter", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Class", + }, + Object { + "kind": "member", + "name": "staticGetter", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 31, + "index": 244, + "line": 10, + }, + "start": Object { + "column": 2, + "index": 215, + "line": 10, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 31, + "index": 244, + "line": 10, + }, + "start": Object { + "column": 2, + "index": 215, + "line": 10, + }, + }, + "memberof": "Class", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "staticSetter", + "namespace": "Class.staticSetter", + "params": Array [ + Object { + "lineNumber": 10, + "name": "v", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Class", + }, + Object { + "kind": "member", + "name": "staticSetter", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "Class", + "namespace": "Class", + "params": Array [ + Object { + "lineNumber": 4, + "name": "a", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Class", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 25, + "index": 63, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 38, + "line": 3, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 25, + "index": 63, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 38, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "T5", + "namespace": "T5", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "T5", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 18, + "index": 66, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 48, + "line": 5, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 18, + "index": 66, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 48, + "line": 5, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "y2Default", + "namespace": "y2Default", + "params": Array [], + "path": Array [ + Object { + "name": "y2Default", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 31, + "index": 124, + "line": 8, + }, + "start": Object { + "column": 0, + "index": 93, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Description of y3", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 24, + "index": 92, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 68, + "line": 7, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "y4", + "namespace": "y4", + "params": Array [ + Object { + "lineNumber": 8, + "name": "p", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "y4", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "title": "returns", + "type": Object { + "type": "VoidLiteral", + }, + }, + ], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 360, + "line": 19, + }, + "start": Object { + "column": 0, + "index": 248, + "line": 13, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 2, + "index": 360, + "line": 19, + }, + "start": Object { + "column": 0, + "index": 248, + "line": 13, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 13, + "index": 283, + "line": 14, + }, + "start": Object { + "column": 2, + "index": 272, + "line": 14, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 13, + "index": 283, + "line": 14, + }, + "start": Object { + "column": 2, + "index": 272, + "line": 14, + }, + }, + "memberof": "object", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "method", + "namespace": "object.method", + "params": Array [], + "path": Array [ + Object { + "name": "object", + }, + Object { + "kind": "function", + "name": "method", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 17, + "index": 302, + "line": 15, + }, + "start": Object { + "column": 2, + "index": 287, + "line": 15, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 17, + "index": 302, + "line": 15, + }, + "start": Object { + "column": 2, + "index": 287, + "line": 15, + }, + }, + "memberof": "object", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "getter", + "namespace": "object.getter", + "params": Array [], + "path": Array [ + Object { + "name": "object", + }, + Object { + "kind": "member", + "name": "getter", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 18, + "index": 322, + "line": 16, + }, + "start": Object { + "column": 2, + "index": 306, + "line": 16, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 18, + "index": 322, + "line": 16, + }, + "start": Object { + "column": 2, + "index": 306, + "line": 16, + }, + }, + "memberof": "object", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "setter", + "namespace": "object.setter", + "params": Array [ + Object { + "lineNumber": 16, + "name": "v", + "title": "param", + }, + ], + "path": Array [ + Object { + "name": "object", + }, + Object { + "kind": "member", + "name": "setter", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 10, + "index": 334, + "line": 17, + }, + "start": Object { + "column": 2, + "index": 326, + "line": 17, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "index": 334, + "line": 17, + }, + "start": Object { + "column": 2, + "index": 326, + "line": 17, + }, + }, + "memberof": "object", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "prop", + "namespace": "object.prop", + "params": Array [], + "path": Array [ + Object { + "name": "object", + }, + Object { + "name": "prop", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 21, + "index": 357, + "line": 18, + }, + "start": Object { + "column": 2, + "index": 338, + "line": 18, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 21, + "index": 357, + "line": 18, + }, + "start": Object { + "column": 2, + "index": 338, + "line": 18, + }, + }, + "memberof": "object", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "func", + "namespace": "object.func", + "params": Array [], + "path": Array [ + Object { + "name": "object", + }, + Object { + "kind": "function", + "name": "func", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "object", + "namespace": "object", + "params": Array [], + "path": Array [ + Object { + "name": "object", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 16, + "index": 1264, + "line": 55, + }, + "start": Object { + "column": 0, + "index": 1248, + "line": 55, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 16, + "index": 1264, + "line": 55, + }, + "start": Object { + "column": 0, + "index": 1248, + "line": 55, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "f1", + "namespace": "f1", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "f1", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 16, + "index": 1281, + "line": 56, + }, + "start": Object { + "column": 0, + "index": 1265, + "line": 56, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 16, + "index": 1281, + "line": 56, + }, + "start": Object { + "column": 0, + "index": 1265, + "line": 56, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "f3", + "namespace": "f3", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "f3", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 23, + "index": 1332, + "line": 60, + }, + "start": Object { + "column": 0, + "index": 1309, + "line": 60, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 23, + "index": 1332, + "line": 60, + }, + "start": Object { + "column": 0, + "index": 1309, + "line": 60, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "T", + "namespace": "T", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "T", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "number", + "type": "NameExpression", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 17, + "index": 1350, + "line": 61, + }, + "start": Object { + "column": 0, + "index": 1333, + "line": 61, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 17, + "index": 1350, + "line": 61, + }, + "start": Object { + "column": 0, + "index": 1333, + "line": 61, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "T2", + "namespace": "T2", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "T2", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "string", + "type": "NameExpression", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 17, + "index": 1368, + "line": 62, + }, + "start": Object { + "column": 0, + "index": 1351, + "line": 62, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 17, + "index": 1368, + "line": 62, + }, + "start": Object { + "column": 0, + "index": 1351, + "line": 62, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "T4", + "namespace": "T4", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "T4", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "string", + "type": "NameExpression", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 34, + "index": 1488, + "line": 68, + }, + "start": Object { + "column": 0, + "index": 1454, + "line": 68, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 34, + "index": 1488, + "line": 68, + }, + "start": Object { + "column": 0, + "index": 1454, + "line": 68, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "f4", + "namespace": "f4", + "params": Array [ + Object { + "lineNumber": 68, + "name": "x", + "title": "param", + "type": Object { + "name": "X", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "f4", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 1537, + "line": 74, + }, + "start": Object { + "column": 0, + "index": 1506, + "line": 72, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 2, + "index": 1537, + "line": 74, + }, + "start": Object { + "column": 0, + "index": 1506, + "line": 72, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 10, + "index": 1534, + "line": 73, + }, + "start": Object { + "column": 2, + "index": 1526, + "line": 73, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 10, + "index": 1534, + "line": 73, + }, + "start": Object { + "column": 2, + "index": 1526, + "line": 73, + }, + }, + "memberof": "o1", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "om1", + "namespace": "o1.om1", + "params": Array [], + "path": Array [ + Object { + "name": "o1", + }, + Object { + "kind": "function", + "name": "om1", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "o1", + "namespace": "o1", + "params": Array [], + "path": Array [ + Object { + "name": "o1", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 4, + "index": 1611, + "line": 80, + }, + "start": Object { + "column": 0, + "index": 1557, + "line": 77, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "f5 comment", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 17, + "index": 1556, + "line": 76, + }, + "start": Object { + "column": 0, + "index": 1539, + "line": 76, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "f5", + "namespace": "f5", + "params": Array [ + Object { + "lineNumber": 77, + "name": "y", + "title": "param", + "type": Object { + "name": "Y", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "f5", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 1610, + "line": 80, + }, + "start": Object { + "column": 2, + "index": 1587, + "line": 78, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 3, + "index": 1610, + "line": 80, + }, + "start": Object { + "column": 2, + "index": 1587, + "line": 78, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 12, + "index": 1606, + "line": 79, + }, + "start": Object { + "column": 4, + "index": 1598, + "line": 79, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 12, + "index": 1606, + "line": 79, + }, + "start": Object { + "column": 4, + "index": 1598, + "line": 79, + }, + }, + "memberof": "o2", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "om2", + "namespace": "o2.om2", + "params": Array [], + "path": Array [ + Object { + "name": "o2", + }, + Object { + "kind": "function", + "name": "om2", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "o2", + "namespace": "o2", + "params": Array [], + "path": Array [ + Object { + "name": "o2", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs document-exported.input.js markdown 1`] = ` +" + +### Table of Contents + +* [x][1] + * [Parameters][2] +* [z][3] + * [zMethod][4] +* [Class][5] + * [Parameters][6] + * [classMethod][7] + * [classGetter][8] + * [classSetter][9] + * [Parameters][10] + * [staticMethod][11] + * [staticGetter][12] + * [staticSetter][13] + * [Parameters][14] +* [T5][15] +* [y2Default][16] +* [y4][17] + * [Parameters][18] +* [object][19] + * [method][20] + * [getter][21] + * [setter][22] + * [Parameters][23] + * [prop][24] + * [func][25] +* [f1][26] +* [f3][27] +* [T][28] +* [T2][29] +* [T4][30] +* [f4][31] + * [Parameters][32] +* [o1][33] + * [om1][34] +* [f5][35] + * [Parameters][36] +* [o2][37] + * [om2][38] + +## x + +### Parameters + +* \`yparam\` + +## z + +### zMethod + +## Class + +### Parameters + +* \`a\` **[string][39]** + +### classMethod + +### classGetter + +### classSetter + +#### Parameters + +* \`v\` + +### staticMethod + +### staticGetter + +### staticSetter + +#### Parameters + +* \`v\` + +## T5 + +Type: [boolean][40] + +## y2Default + +## y4 + +Description of y3 + +### Parameters + +* \`p\` **[number][41]** + +Returns **void** + +## object + +### method + +### getter + +### setter + +#### Parameters + +* \`v\` + +### prop + +### func + +## f1 + +## f3 + +## T + +Type: [number][41] + +## T2 + +Type: [string][39] + +## T4 + +Type: [string][39] + +## f4 + +### Parameters + +* \`x\` **X** + +## o1 + +### om1 + +## f5 + +f5 comment + +### Parameters + +* \`y\` **Y** + +## o2 + +### om2 + +[1]: #x + +[2]: #parameters + +[3]: #z + +[4]: #zmethod + +[5]: #class + +[6]: #parameters-1 + +[7]: #classmethod + +[8]: #classgetter + +[9]: #classsetter + +[10]: #parameters-2 + +[11]: #staticmethod + +[12]: #staticgetter + +[13]: #staticsetter + +[14]: #parameters-3 + +[15]: #t5 + +[16]: #y2default + +[17]: #y4 + +[18]: #parameters-4 + +[19]: #object + +[20]: #method + +[21]: #getter + +[22]: #setter + +[23]: #parameters-5 + +[24]: #prop + +[25]: #func + +[26]: #f1 + +[27]: #f3 + +[28]: #t + +[29]: #t2 + +[30]: #t4 + +[31]: #f4 + +[32]: #parameters-6 + +[33]: #o1 + +[34]: #om1 + +[35]: #f5 + +[36]: #parameters-7 + +[37]: #o2 + +[38]: #om2 + +[39]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[40]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[41]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs document-exported.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "x", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "yparam", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "z", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "zMethod", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Class", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "classMethod", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "classGetter", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "classSetter", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "v", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "staticMethod", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "staticGetter", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "staticSetter", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "v", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T5", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "y2Default", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "y4", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Description of y3", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "p", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "void", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "object", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "method", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "getter", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "setter", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "v", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "prop", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "func", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f1", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f3", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T2", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T4", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f4", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "X", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "o1", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "om1", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f5", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f5 comment", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "y", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Y", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "o2", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "om2", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs document-exported-export-default-object.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 67, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 3, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 2, + "index": 67, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "document-exported-export-default-object.input", + "namespace": "document-exported-export-default-object.input", + "params": Array [], + "path": Array [ + Object { + "name": "document-exported-export-default-object.input", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 7, + "index": 64, + "line": 4, + }, + "start": Object { + "column": 2, + "index": 59, + "line": 4, + }, + }, + }, + "description": "", + "errors": Array [ + Object { + "commentLineNumber": 0, + "message": "@memberof reference to document-exported-export-default-object.input not found", + }, + ], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 7, + "index": 64, + "line": 4, + }, + "start": Object { + "column": 2, + "index": 59, + "line": 4, + }, + }, + "memberof": "document-exported-export-default-object.input", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "x", + "namespace": ".x", + "params": Array [], + "path": Array [ + Object { + "name": "x", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs document-exported-export-default-object.input.js markdown 1`] = ` +" + +### Table of Contents + +* [document-exported-export-default-object.input][1] +* [x][2] + +## document-exported-export-default-object.input + +## x + +[1]: #document-exported-export-default-objectinput + +[2]: #x +" +`; + +exports[`outputs document-exported-export-default-object.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "document-exported-export-default-object.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "x", + }, + ], + "depth": 2, + "type": "heading", + }, + ], + "type": "root", +} +`; + +exports[`outputs document-exported-export-default-value.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 18, + "index": 58, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 3, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 18, + "index": 58, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "document-exported-export-default-value.input", + "namespace": "document-exported-export-default-value.input", + "params": Array [], + "path": Array [ + Object { + "name": "document-exported-export-default-value.input", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs document-exported-export-default-value.input.js markdown 1`] = ` +" + +### Table of Contents + +* [document-exported-export-default-value.input][1] + +## document-exported-export-default-value.input + +[1]: #document-exported-export-default-valueinput +" +`; + +exports[`outputs document-exported-export-default-value.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "document-exported-export-default-value.input", + }, + ], + "depth": 2, + "type": "heading", + }, + ], + "type": "root", +} +`; + +exports[`outputs es6.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 10, + "index": 192, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 103, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function destructures with defaults. It should not +have any parameter descriptions.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 102, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "destructure", + "namespace": "destructure", + "params": Array [ + Object { + "anonymous": true, + "default": "{}", + "name": "$0", + "properties": Array [ + Object { + "default": "[]", + "lineNumber": 6, + "name": "$0.phoneNumbers", + "title": "param", + }, + Object { + "default": "[]", + "lineNumber": 7, + "name": "$0.emailAddresses", + "title": "param", + }, + Object { + "lineNumber": 8, + "name": "$0.params", + "title": "param", + "type": Object { + "type": "RestType", + }, + }, + ], + "title": "param", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "destructure", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 37, + "index": 311, + "line": 16, + }, + "start": Object { + "column": 0, + "index": 274, + "line": 16, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Similar, but with an array", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [ + Object { + "description": "destructure2([0, 1, 2, 3])", + }, + ], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 273, + "line": 15, + }, + "start": Object { + "column": 0, + "index": 194, + "line": 11, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "destructure2", + "namespace": "destructure2", + "params": Array [ + Object { + "anonymous": true, + "name": "$0", + "properties": Array [ + Object { + "name": "$0.0", + "title": "param", + }, + Object { + "lineNumber": 16, + "name": "$0.1", + "title": "param", + }, + Object { + "lineNumber": 16, + "name": "$0.2", + "title": "param", + }, + Object { + "lineNumber": 16, + "name": "$0.3", + "title": "param", + }, + ], + "title": "param", + "type": Object { + "name": "Array", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "destructure2", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "destructure2([0, 1, 2, 3])", + "lineNumber": 2, + "title": "example", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 31, + "index": 472, + "line": 23, + }, + "start": Object { + "column": 0, + "index": 441, + "line": 23, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 440, + "line": 22, + }, + "start": Object { + "column": 0, + "index": 313, + "line": 18, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "multiply", + "namespace": "multiply", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "an array of numbers", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "a", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "Number", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + Object { + "lineNumber": 23, + "name": "b", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "multiply", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "an array of numbers", + "lineNumber": 2, + "name": "a", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "Number", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + Object { + "description": "numberone", + "lineNumber": 3, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 1217, + "line": 75, + }, + "start": Object { + "column": 0, + "index": 663, + "line": 36, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a sink", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [ + Object { + "description": "@abc +class A { + @bind + say() {} +}", + }, + ], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 662, + "line": 35, + }, + "start": Object { + "column": 0, + "index": 474, + "line": 25, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 18, + "index": 829, + "line": 45, + }, + "start": Object { + "column": 2, + "index": 813, + "line": 45, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a property of the sink.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 5, + "index": 810, + "line": 44, + }, + "start": Object { + "column": 2, + "index": 764, + "line": 42, + }, + }, + "memberof": "Sink", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "staticProp", + "namespace": "Sink#staticProp", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Sink", + }, + Object { + "kind": "member", + "name": "staticProp", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 889, + "line": 52, + }, + "start": Object { + "column": 2, + "index": 862, + "line": 50, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Is it empty", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 5, + "index": 859, + "line": 49, + }, + "start": Object { + "column": 2, + "index": 833, + "line": 47, + }, + }, + "memberof": "Sink", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "empty", + "namespace": "Sink#empty", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Sink", + }, + Object { + "kind": "function", + "name": "empty", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 4, + "index": 1007, + "line": 59, + }, + "start": Object { + "column": 2, + "index": 949, + "line": 57, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This uses the class property transform", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 5, + "index": 946, + "line": 56, + }, + "start": Object { + "column": 2, + "index": 893, + "line": 54, + }, + }, + "memberof": "Sink", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "classprop", + "namespace": "Sink#classprop", + "params": Array [ + Object { + "lineNumber": 57, + "name": "a", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Sink", + }, + Object { + "kind": "member", + "name": "classprop", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 1215, + "line": 74, + }, + "start": Object { + "column": 2, + "index": 1181, + "line": 72, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a getter method: it should be documented +as a property.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 5, + "index": 1178, + "line": 71, + }, + "start": Object { + "column": 2, + "index": 1095, + "line": 68, + }, + }, + "memberof": "Sink", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "aGetter", + "namespace": "Sink#aGetter", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Sink", + }, + Object { + "kind": "member", + "name": "aGetter", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 1091, + "line": 66, + }, + "start": Object { + "column": 2, + "index": 1051, + "line": 64, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method says hello", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 5, + "index": 1048, + "line": 63, + }, + "start": Object { + "column": 2, + "index": 1011, + "line": 61, + }, + }, + "memberof": "Sink", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "hello", + "namespace": "Sink.hello", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Sink", + }, + Object { + "kind": "function", + "name": "hello", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "Sink", + "namespace": "Sink", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the height of the thing", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "height", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the width of the thing", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "width", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Sink", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "the height of the thing", + "lineNumber": 2, + "name": "height", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "the width of the thing", + "lineNumber": 3, + "name": "width", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "@abc +class A { + @bind + say() {} +}", + "lineNumber": 4, + "title": "example", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 25, + "index": 1349, + "line": 82, + }, + "start": Object { + "column": 0, + "index": 1324, + "line": 82, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method returns a basket. The type should not be linked.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 1323, + "line": 81, + }, + "start": Object { + "column": 0, + "index": 1219, + "line": 77, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "makeABasket", + "namespace": "makeABasket", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "makeABasket", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "a basket", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Basket", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "a basket", + "lineNumber": 3, + "title": "returns", + "type": Object { + "name": "Basket", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 23, + "index": 1540, + "line": 90, + }, + "start": Object { + "column": 0, + "index": 1517, + "line": 90, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method returns a ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "sink", + }, + ], + "jsdoc": true, + "title": null, + "type": "link", + "url": "Sink", + }, + Object { + "type": "text", + "value": ". The type should be linked. +It takes a ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "jsdoc": true, + "title": null, + "type": "link", + "url": "number", + }, + Object { + "type": "text", + "value": " which should also be linked.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 1516, + "line": 89, + }, + "start": Object { + "column": 0, + "index": 1351, + "line": 84, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "makeASink", + "namespace": "makeASink", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "makeASink", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "a sink", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Sink", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "a sink", + "lineNumber": 4, + "title": "returns", + "type": Object { + "name": "Sink", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 43, + "index": 1628, + "line": 95, + }, + "start": Object { + "column": 0, + "index": 1585, + "line": 95, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function takes rest params", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 1584, + "line": 94, + }, + "start": Object { + "column": 0, + "index": 1542, + "line": 92, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "functionWithRest", + "namespace": "functionWithRest", + "params": Array [ + Object { + "lineNumber": 95, + "name": "someParams", + "title": "param", + "type": Object { + "type": "RestType", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "functionWithRest", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 1856, + "line": 107, + }, + "start": Object { + "column": 0, + "index": 1670, + "line": 100, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "So does this one, with types", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 1669, + "line": 99, + }, + "start": Object { + "column": 0, + "index": 1630, + "line": 97, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "functionWithRestAndType", + "namespace": "functionWithRestAndType", + "params": Array [ + Object { + "lineNumber": 100, + "name": "someParams", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "RestType", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "functionWithRestAndType", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "async": true, + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 23, + "index": 1935, + "line": 114, + }, + "start": Object { + "column": 0, + "index": 1912, + "line": 114, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is an async method", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 1911, + "line": 113, + }, + "start": Object { + "column": 0, + "index": 1877, + "line": 111, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 36, + "index": 2079, + "line": 122, + }, + "start": Object { + "column": 0, + "index": 2043, + "line": 122, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 2042, + "line": 121, + }, + "start": Object { + "column": 0, + "index": 1963, + "line": 118, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "es6.input", + "namespace": "es6.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "es6.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 2208, + "line": 129, + }, + "start": Object { + "column": 0, + "index": 2145, + "line": 127, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of optional parameters in ES6", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 2144, + "line": 126, + }, + "start": Object { + "column": 0, + "index": 2081, + "line": 124, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "veryImportantTransform", + "namespace": "veryImportantTransform", + "params": Array [ + Object { + "default": "'bar'", + "lineNumber": 127, + "name": "foo", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "veryImportantTransform", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "access": "protected", + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 26, + "index": 2368, + "line": 143, + }, + "start": Object { + "column": 0, + "index": 2342, + "line": 143, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "A protected function", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 2341, + "line": 142, + }, + "start": Object { + "column": 0, + "index": 2296, + "line": 139, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "iAmProtected", + "namespace": "iAmProtected", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "iAmProtected", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "protected", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "access": "public", + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 23, + "index": 2433, + "line": 149, + }, + "start": Object { + "column": 0, + "index": 2410, + "line": 149, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "A public function", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 2409, + "line": 148, + }, + "start": Object { + "column": 0, + "index": 2370, + "line": 145, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "iAmPublic", + "namespace": "iAmPublic", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "iAmPublic", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "public", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 42, + "index": 2610, + "line": 160, + }, + "start": Object { + "column": 0, + "index": 2568, + "line": 160, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is re-exported", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 3, + "index": 2567, + "line": 159, + }, + "start": Object { + "column": 0, + "index": 2537, + "line": 157, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "execute", + "namespace": "execute", + "params": Array [], + "path": Array [ + Object { + "name": "execute", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 2819, + "line": 169, + }, + "start": Object { + "column": 0, + "index": 2645, + "line": 163, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Regression check for #498", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 32, + "index": 2644, + "line": 162, + }, + "start": Object { + "column": 0, + "index": 2612, + "line": 162, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "isArrayEqualWith", + "namespace": "isArrayEqualWith", + "params": Array [ + Object { + "lineNumber": 164, + "name": "array1", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "T", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + Object { + "lineNumber": 165, + "name": "array2", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "T", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + Object { + "default": "(a:T,b:T):boolean=>a===b", + "lineNumber": 166, + "name": "compareFunction", + "title": "param", + "type": Object { + "params": Array [ + Object { + "expression": Object { + "name": "T", + "type": "NameExpression", + }, + "name": "a", + "type": "ParameterType", + }, + Object { + "expression": Object { + "name": "T", + "type": "NameExpression", + }, + "name": "b", + "type": "ParameterType", + }, + ], + "result": Object { + "name": "boolean", + "type": "NameExpression", + }, + "type": "FunctionType", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "isArrayEqualWith", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "title": "returns", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 2936, + "line": 174, + }, + "start": Object { + "column": 0, + "index": 2854, + "line": 172, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Regression check for #749", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 32, + "index": 2853, + "line": 171, + }, + "start": Object { + "column": 0, + "index": 2821, + "line": 171, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "paramWithMemberType", + "namespace": "paramWithMemberType", + "params": Array [ + Object { + "lineNumber": 172, + "name": "a", + "title": "param", + "type": Object { + "name": "atype.property", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "paramWithMemberType", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "title": "returns", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 3228, + "line": 189, + }, + "start": Object { + "column": 0, + "index": 2966, + "line": 177, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "babel parser plugins", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 27, + "index": 2965, + "line": 176, + }, + "start": Object { + "column": 0, + "index": 2938, + "line": 176, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "A", + "namespace": "A", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "A", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs es6.input.js markdown 1`] = ` +" + +### Table of Contents + +* [destructure][1] + * [Parameters][2] +* [destructure2][3] + * [Parameters][4] + * [Examples][5] +* [multiply][6] + * [Parameters][7] +* [Sink][8] + * [Parameters][9] + * [Examples][10] + * [staticProp][11] + * [empty][12] + * [classprop][13] + * [Parameters][14] + * [aGetter][15] + * [hello][16] +* [makeABasket][17] +* [makeASink][18] +* [functionWithRest][19] + * [Parameters][20] +* [functionWithRestAndType][21] + * [Parameters][22] +* [foo][23] +* [es6.input][24] +* [veryImportantTransform][25] + * [Parameters][26] +* [iAmProtected][27] +* [iAmPublic][28] +* [execute][29] +* [isArrayEqualWith][30] + * [Parameters][31] +* [paramWithMemberType][32] + * [Parameters][33] +* [A][34] + +## destructure + +This function destructures with defaults. It should not +have any parameter descriptions. + +### Parameters + +* \`$0\` **[Object][35]** (optional, default \`{}\`) + + * \`$0.phoneNumbers\` (optional, default \`[]\`) + * \`$0.emailAddresses\` (optional, default \`[]\`) + * \`$0.params\` **...any** + +## destructure2 + +Similar, but with an array + +### Parameters + +* \`$0\` **[Array][36]** + + * \`$0.0\` + * \`$0.1\` + * \`$0.2\` + * \`$0.3\` + +### Examples + +\`\`\`javascript +destructure2([0, 1, 2, 3]) +\`\`\` + +## multiply + +This function returns the number one. + +### Parameters + +* \`a\` **[Array][36]<[Number][37]>** an array of numbers +* \`b\` + +Returns **[Number][37]** numberone + +## Sink + +This is a sink + +### Parameters + +* \`height\` **[number][37]** the height of the thing +* \`width\` **[number][37]** the width of the thing + +### Examples + +\`\`\`javascript +@abc +class A { + @bind + say() {} +} +\`\`\` + +### staticProp + +This is a property of the sink. + +### empty + +Is it empty + +### classprop + +This uses the class property transform + +#### Parameters + +* \`a\` **[number][37]** + +Returns **[string][38]** + +### aGetter + +This is a getter method: it should be documented +as a property. + +### hello + +This method says hello + +## makeABasket + +This method returns a basket. The type should not be linked. + +Returns **Basket** a basket + +## makeASink + +This method returns a [sink][8]. The type should be linked. +It takes a [number][37] which should also be linked. + +Returns **[Sink][8]** a sink + +## functionWithRest + +This function takes rest params + +### Parameters + +* \`someParams\` **...any** + +## functionWithRestAndType + +So does this one, with types + +### Parameters + +* \`someParams\` **...[number][37]** + +## foo + +This is an async method + +## es6.input + +This function returns the number one. + +Returns **[Number][37]** numberone + +## veryImportantTransform + +This tests our support of optional parameters in ES6 + +### Parameters + +* \`foo\` (optional, default \`'bar'\`) + +## iAmProtected + +A protected function + +## iAmPublic + +A public function + +## execute + +This is re-exported + +## isArrayEqualWith + +Regression check for #498 + +### Parameters + +* \`array1\` **[Array][36]\\\\** +* \`array2\` **[Array][36]\\\\** +* \`compareFunction\` **function (a: T, b: T): [boolean][39]** (optional, default \`(a:T,b:T):boolean=>a===b\`) + +Returns **[boolean][39]** + +## paramWithMemberType + +Regression check for #749 + +### Parameters + +* \`a\` **atype.property** + +Returns **[boolean][39]** + +## A + +babel parser plugins + +[1]: #destructure + +[2]: #parameters + +[3]: #destructure2 + +[4]: #parameters-1 + +[5]: #examples + +[6]: #multiply + +[7]: #parameters-2 + +[8]: #sink + +[9]: #parameters-3 + +[10]: #examples-1 + +[11]: #staticprop + +[12]: #empty + +[13]: #classprop + +[14]: #parameters-4 + +[15]: #agetter + +[16]: #hello + +[17]: #makeabasket + +[18]: #makeasink + +[19]: #functionwithrest + +[20]: #parameters-5 + +[21]: #functionwithrestandtype + +[22]: #parameters-6 + +[23]: #foo + +[24]: #es6input + +[25]: #veryimportanttransform + +[26]: #parameters-7 + +[27]: #iamprotected + +[28]: #iampublic + +[29]: #execute + +[30]: #isarrayequalwith + +[31]: #parameters-8 + +[32]: #paramwithmembertype + +[33]: #parameters-9 + +[34]: #a + +[35]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[36]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array + +[37]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[38]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[39]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean +" +`; + +exports[`outputs es6.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "destructure", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function destructures with defaults. It should not +have any parameter descriptions.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "{}", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0.phoneNumbers", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "[]", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0.emailAddresses", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "[]", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0.params", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "...", + }, + Object { + "type": "text", + "value": "any", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "destructure2", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Similar, but with an array", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0.0", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0.1", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0.2", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$0.3", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Examples", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "lang": "javascript", + "type": "code", + "value": "destructure2([0, 1, 2, 3])", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "multiply", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ">", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "an array of numbers", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "b", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Sink", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a sink", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "height", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the height of the thing", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "width", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the width of the thing", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Examples", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "lang": "javascript", + "type": "code", + "value": "@abc +class A { + @bind + say() {} +}", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "staticProp", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a property of the sink.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "empty", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Is it empty", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "classprop", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This uses the class property transform", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "aGetter", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a getter method: it should be documented +as a property.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "hello", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method says hello", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "makeABasket", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method returns a basket. The type should not be linked.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Basket", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "a basket", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "makeASink", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method returns a ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "sink", + }, + ], + "identifier": "5", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ". The type should be linked. +It takes a ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": " which should also be linked.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Sink", + }, + ], + "identifier": "5", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "a sink", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "functionWithRest", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function takes rest params", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "someParams", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "...", + }, + Object { + "type": "text", + "value": "any", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "functionWithRestAndType", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "So does this one, with types", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "someParams", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "...", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is an async method", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "es6.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "veryImportantTransform", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of optional parameters in ES6", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "foo", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "'bar'", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "iAmProtected", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A protected function", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "iAmPublic", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A public function", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "execute", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is re-exported", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "isArrayEqualWith", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Regression check for #498", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "array1", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "type": "text", + "value": "T", + }, + Object { + "type": "text", + "value": ">", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "array2", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "type": "text", + "value": "T", + }, + Object { + "type": "text", + "value": ">", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "compareFunction", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "function (", + }, + Object { + "type": "text", + "value": "a: ", + }, + Object { + "type": "text", + "value": "T", + }, + Object { + "type": "text", + "value": ", ", + }, + Object { + "type": "text", + "value": "b: ", + }, + Object { + "type": "text", + "value": "T", + }, + Object { + "type": "text", + "value": ")", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "6", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "(a:T,b:T):boolean=>a===b", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "6", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "paramWithMemberType", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Regression check for #749", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "atype.property", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "6", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "babel parser plugins", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "4", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + Object { + "identifier": "5", + "title": "", + "type": "definition", + "url": "#sink", + }, + Object { + "identifier": "6", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + }, + ], + "type": "root", +} +`; + +exports[`outputs es6.input.js no markdown TOC 1`] = `"[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]"`; + +exports[`outputs es6-class.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [ + Object { + "name": "React.Component", + "title": "augments", + }, + ], + "context": Object { + "loc": Object { + "end": Object { + "column": 36, + "index": 93, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 57, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my component. This is from issue #458", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 56, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Foo", + "namespace": "Foo", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 295, + "line": 18, + }, + "start": Object { + "column": 0, + "index": 167, + "line": 10, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Does nothing. This is from issue #556", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 166, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 95, + "line": 6, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 18, + "index": 289, + "line": 16, + }, + "start": Object { + "column": 4, + "index": 275, + "line": 16, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "A useless property", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 7, + "index": 270, + "line": 15, + }, + "start": Object { + "column": 4, + "index": 211, + "line": 12, + }, + }, + "memberof": "Bar", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "bar", + "namespace": "Bar#bar", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Bar", + }, + Object { + "name": "bar", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "type", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "string", + "type": "NameExpression", + }, + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "Bar", + "namespace": "Bar", + "params": Array [ + Object { + "lineNumber": 2, + "name": "str", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Bar", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "str", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 428, + "line": 25, + }, + "start": Object { + "column": 0, + "index": 362, + "line": 23, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This class has fully inferred constructor parameters.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 361, + "line": 22, + }, + "start": Object { + "column": 0, + "index": 297, + "line": 20, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Baz", + "namespace": "Baz", + "params": Array [ + Object { + "lineNumber": 24, + "name": "n", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "lineNumber": 24, + "name": "l", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "string", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Baz", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs es6-class.input.js markdown 1`] = ` +" + +### Table of Contents + +* [Foo][1] +* [Bar][2] + * [Parameters][3] + * [bar][4] +* [Baz][5] + * [Parameters][6] + +## Foo + +**Extends React.Component** + +This is my component. This is from issue #458 + +## Bar + +Does nothing. This is from issue #556 + +### Parameters + +* \`str\` **[string][7]** + +### bar + +A useless property + +Type: [string][7] + +## Baz + +This class has fully inferred constructor parameters. + +### Parameters + +* \`n\` **[number][8]** +* \`l\` **[Array][9]<[string][7]>** + +[1]: #foo + +[2]: #bar + +[3]: #parameters + +[4]: #bar-1 + +[5]: #baz + +[6]: #parameters-1 + +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array +" +`; + +exports[`outputs es6-class.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Extends ", + }, + Object { + "type": "text", + "value": "React.Component", + }, + ], + "type": "strong", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my component. This is from issue #458", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Bar", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Does nothing. This is from issue #556", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "str", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "bar", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A useless property", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Baz", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This class has fully inferred constructor parameters.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "n", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "l", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ">", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array", + }, + ], + "type": "root", +} +`; + +exports[`outputs es6-class-property.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 361, + "line": 25, + }, + "start": Object { + "column": 0, + "index": 34, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is for issue 906.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 33, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 175, + "line": 11, + }, + "start": Object { + "column": 2, + "index": 129, + "line": 9, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a read-write property.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 5, + "index": 126, + "line": 8, + }, + "start": Object { + "column": 2, + "index": 60, + "line": 5, + }, + }, + "memberof": "Issue906", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "readWriteProp", + "namespace": "Issue906#readWriteProp", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Issue906", + }, + Object { + "kind": "member", + "name": "readWriteProp", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "type", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 359, + "line": 24, + }, + "start": Object { + "column": 2, + "index": 317, + "line": 22, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a read-only property.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 5, + "index": 314, + "line": 21, + }, + "start": Object { + "column": 2, + "index": 235, + "line": 17, + }, + }, + "memberof": "Issue906", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "readOnlyProp", + "namespace": "Issue906#readOnlyProp", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Issue906", + }, + Object { + "kind": "member", + "name": "readOnlyProp", + "scope": "instance", + }, + ], + "properties": Array [], + "readonly": true, + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "title": "type", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": null, + "lineNumber": 3, + "title": "readonly", + }, + ], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "string", + "type": "NameExpression", + }, + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "Issue906", + "namespace": "Issue906", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Issue906", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs es6-class-property.input.js markdown 1`] = ` +" + +### Table of Contents + +* [Issue906][1] + * [readWriteProp][2] + * [readOnlyProp][3] + +## Issue906 + +This is for issue 906. + +### readWriteProp + +This is a read-write property. + +Type: [boolean][4] + +### readOnlyProp + +This is a read-only property. + +Type: [string][5] + +[1]: #issue906 + +[2]: #readwriteprop + +[3]: #readonlyprop + +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +" +`; + +exports[`outputs es6-class-property.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Issue906", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is for issue 906.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "readWriteProp", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a read-write property.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "readOnlyProp", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is a read-only property.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + ], + "type": "root", +} +`; + +exports[`outputs es6-default2.input.js JSON 1`] = ` +Array [ + Object { + "access": "public", + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 39, + "index": 58, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 19, + "line": 4, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 18, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "es6-default2.input", + "namespace": "es6-default2.input", + "params": Array [ + Object { + "lineNumber": 4, + "name": "thisIsTheArgument", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "es6-default2.input", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 1, + "title": "public", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs es6-default2.input.js markdown 1`] = ` +" + +### Table of Contents + +* [es6-default2.input][1] + * [Parameters][2] + +## es6-default2.input + +### Parameters + +* \`thisIsTheArgument\` + +[1]: #es6-default2input + +[2]: #parameters +" +`; + +exports[`outputs es6-default2.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "es6-default2.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "thisIsTheArgument", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "root", +} +`; + +exports[`outputs es6-import.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 41, + "index": 435, + "line": 14, + }, + "start": Object { + "column": 0, + "index": 394, + "line": 14, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 393, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 314, + "line": 10, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "multiplyTwice", + "namespace": "multiplyTwice", + "params": Array [ + Object { + "lineNumber": 14, + "name": "a", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "multiplyTwice", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 18, + "index": 63, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 45, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is the default export frogs!", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 3, + "index": 44, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "es6-ext", + "namespace": "es6-ext", + "params": Array [], + "path": Array [ + Object { + "name": "es6-ext", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 144, + "line": 8, + }, + "start": Object { + "column": 0, + "index": 80, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 79, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "simple.input", + "namespace": "simple.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "simple.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs es6-import.input.js markdown 1`] = ` +" + +### Table of Contents + +* [multiplyTwice][1] + * [Parameters][2] +* [es6-ext][3] +* [simple.input][4] + +## multiplyTwice + +This function returns the number one. + +### Parameters + +* \`a\` + +Returns **[Number][5]** numberone + +## es6-ext + +This is the default export frogs! + +## simple.input + +This function returns the number one. + +Returns **[number][5]** numberone + +[1]: #multiplytwice + +[2]: #parameters + +[3]: #es6-ext + +[4]: #simpleinput + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs es6-import.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "multiplyTwice", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "es6-ext", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is the default export frogs!", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "simple.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs event.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 0, + "index": 185, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Mouse event", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "event", + "loc": Object { + "end": Object { + "column": 3, + "index": 184, + "line": 8, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Map#mousemove", + "namespace": ".event:Map#mousemove", + "params": Array [], + "path": Array [ + Object { + "kind": "event", + "name": "Map#mousemove", + }, + ], + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the pixel location of the event", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "point", + "title": "property", + "type": Object { + "name": "Point", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the original DOM event", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 6, + "name": "originalEvent", + "title": "property", + "type": Object { + "name": "Event", + "type": "NameExpression", + }, + }, + ], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "Map#mousemove", + "lineNumber": 3, + "title": "event", + }, + Object { + "description": null, + "lineNumber": 4, + "title": "type", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + Object { + "description": "the pixel location of the event", + "lineNumber": 5, + "name": "point", + "title": "property", + "type": Object { + "name": "Point", + "type": "NameExpression", + }, + }, + Object { + "description": "the original DOM event", + "lineNumber": 6, + "name": "originalEvent", + "title": "property", + "type": Object { + "name": "Event", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + "yields": Array [], + }, +] +`; + +exports[`outputs event.input.js markdown 1`] = ` +" + +### Table of Contents + +* [Map#mousemove][1] + * [Properties][2] + +## Map#mousemove + +Mouse event + +Type: [Object][3] + +### Properties + +* \`point\` **Point** the pixel location of the event +* \`originalEvent\` **[Event][4]** the original DOM event + +[1]: #mapmousemove + +[2]: #properties + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[4]: https://developer.mozilla.org/docs/Web/API/Event +" +`; + +exports[`outputs event.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Map#mousemove", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Mouse event", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Properties", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "point", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Point", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the pixel location of the event", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "originalEvent", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Event", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the original DOM event", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/API/Event", + }, + ], + "type": "root", +} +`; + +exports[`outputs example-caption.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 200, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 150, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [ + Object { + "caption": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "demonstrates how to run foo", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "description": "foo(1);", + }, + ], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 149, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + Object { + "caption": "demonstrates how to run foo", + "description": "foo(1);", + "lineNumber": 3, + "title": "example", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs example-caption.input.js markdown 1`] = ` +" + +### Table of Contents + +* [foo][1] + * [Examples][2] + +## foo + +This function returns the number one. + +### Examples + +demonstrates how to run foo + +\`\`\`javascript +foo(1); +\`\`\` + +Returns **[Number][3]** numberone + +[1]: #foo + +[2]: #examples + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs example-caption.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Examples", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "demonstrates how to run foo", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + ], + "type": "paragraph", + }, + Object { + "lang": "javascript", + "type": "code", + "value": "foo(1);", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs external.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 147, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 113, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "I am in ", + }, + Object { + "type": "inlineCode", + "value": "external.input.js", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 112, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 73, + "line": 5, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs external.input.js markdown 1`] = ` +" + +### Table of Contents + +* [foo][1] + +## foo + +I am in \`external.input.js\`. + +[1]: #foo +" +`; + +exports[`outputs external.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "I am in ", + }, + Object { + "type": "inlineCode", + "value": "external.input.js", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs factory.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 255, + "line": 18, + }, + "start": Object { + "column": 0, + "index": 60, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "an area chart generator", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 59, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "area", + "namespace": "area", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "area", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "chart", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "area", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "chart", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "area", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 37, + "index": 150, + "line": 9, + }, + "start": Object { + "column": 2, + "index": 115, + "line": 9, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 5, + "index": 112, + "line": 8, + }, + "start": Object { + "column": 2, + "index": 86, + "line": 6, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "area", + "namespace": "area", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "area", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 1, + "name": "area", + "title": "class", + "type": null, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 30, + "index": 235, + "line": 15, + }, + "start": Object { + "column": 2, + "index": 207, + "line": 15, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Sets the chart data.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "commentLineNumber": 0, + "message": "@memberof reference to chart not found", + }, + ], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 5, + "index": 204, + "line": 14, + }, + "start": Object { + "column": 2, + "index": 154, + "line": 11, + }, + }, + "memberof": "chart", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "data", + "namespace": ".data", + "params": Array [ + Object { + "lineNumber": 15, + "name": "_", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "data", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": null, + "title": "function", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs factory.input.js markdown 1`] = ` +" + +### Table of Contents + +* [area][1] +* [area][2] +* [data][3] + * [Parameters][4] + +## area + +an area chart generator + +Returns **[area][1]** chart + +## area + +## data + +Sets the chart data. + +### Parameters + +* \`_\` + +[1]: #area + +[2]: #area-1 + +[3]: #data + +[4]: #parameters +" +`; + +exports[`outputs factory.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "area", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "an area chart generator", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "area", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "chart", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "area", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "data", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Sets the chart data.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "_", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "#area", + }, + ], + "type": "root", +} +`; + +exports[`outputs flow-exported-opaque-type.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 48, + "index": 95, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 47, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "MyOpaqueType Description Here", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 36, + "index": 46, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 10, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "MyOpaqueType", + "namespace": "MyOpaqueType", + "params": Array [], + "path": Array [ + Object { + "name": "MyOpaqueType", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs flow-exported-opaque-type.input.js markdown 1`] = ` +" + +### Table of Contents + +* [MyOpaqueType][1] + +## MyOpaqueType + +MyOpaqueType Description Here + +[1]: #myopaquetype +" +`; + +exports[`outputs flow-exported-opaque-type.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "MyOpaqueType", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "MyOpaqueType Description Here", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs flow-optional-chaining.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 74, + "index": 95, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 21, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "constant", + "loc": Object { + "end": Object { + "column": 10, + "index": 20, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 10, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [], + "path": Array [ + Object { + "kind": "constant", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "fields": Array [ + Object { + "key": "prop1", + "type": "FieldType", + "value": Object { + "expression": Object { + "fields": Array [ + Object { + "key": "prop2", + "type": "FieldType", + "value": Object { + "expression": Object { + "name": "string", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + ], + "type": "RecordType", + }, + "type": "OptionalType", + }, + }, + ], + "type": "RecordType", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 32, + "index": 141, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 109, + "line": 6, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "value", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "constant", + "loc": Object { + "end": Object { + "column": 12, + "index": 108, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 96, + "line": 5, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "value", + "namespace": "value", + "params": Array [], + "path": Array [ + Object { + "kind": "constant", + "name": "value", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs flow-optional-chaining.input.js markdown 1`] = ` +" + +### Table of Contents + +* [foo][1] +* [value][2] + +## foo + +foo + +Type: {prop1: {prop2: [string][3]?}?} + +## value + +value + +[1]: #foo + +[2]: #value + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +" +`; + +exports[`outputs flow-optional-chaining.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "type": "text", + "value": "{", + }, + Object { + "type": "text", + "value": "prop1: ", + }, + Object { + "type": "text", + "value": "{", + }, + Object { + "type": "text", + "value": "prop2: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + Object { + "type": "text", + "value": "}", + }, + Object { + "type": "text", + "value": "?", + }, + Object { + "type": "text", + "value": "}", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "value", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "value", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + ], + "type": "root", +} +`; + +exports[`outputs flow-unnamed-params.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 19, + "index": 38, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 19, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "x", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 8, + "index": 18, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 10, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "x", + "namespace": "x", + "params": Array [], + "path": Array [ + Object { + "name": "x", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "params": Array [ + Object { + "expression": Object { + "name": "T", + "type": "NameExpression", + }, + "name": "", + "type": "ParameterType", + }, + ], + "result": Object { + "name": "string", + "type": "NameExpression", + }, + "type": "FunctionType", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 25, + "index": 75, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 50, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "x2", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 9, + "index": 49, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 6, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "x2", + "namespace": "x2", + "params": Array [], + "path": Array [ + Object { + "name": "x2", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "params": Array [ + Object { + "expression": Object { + "name": "T", + "type": "NameExpression", + }, + "name": "a", + "type": "ParameterType", + }, + ], + "result": Object { + "name": "string", + "type": "NameExpression", + }, + "type": "FunctionType", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 39, + "index": 125, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 86, + "line": 10, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "T", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 8, + "index": 85, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 77, + "line": 9, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "T", + "namespace": "T", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "T", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "params": Array [ + Object { + "expression": Object { + "applications": Array [ + Object { + "name": "string", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + "name": "", + "type": "ParameterType", + }, + ], + "result": Object { + "fields": Array [ + Object { + "key": "num", + "type": "FieldType", + "value": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "type": "RecordType", + }, + "type": "FunctionType", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 43, + "index": 180, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 137, + "line": 13, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "T2", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 9, + "index": 136, + "line": 12, + }, + "start": Object { + "column": 0, + "index": 127, + "line": 12, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "T2", + "namespace": "T2", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "T2", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "params": Array [ + Object { + "expression": Object { + "applications": Array [ + Object { + "name": "string", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + "name": "a", + "type": "ParameterType", + }, + ], + "result": Object { + "fields": Array [ + Object { + "key": "num", + "type": "FieldType", + "value": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "type": "RecordType", + }, + "type": "FunctionType", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 42, + "index": 234, + "line": 16, + }, + "start": Object { + "column": 0, + "index": 192, + "line": 16, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "T3", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 9, + "index": 191, + "line": 15, + }, + "start": Object { + "column": 0, + "index": 182, + "line": 15, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "T3", + "namespace": "T3", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "T3", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "params": Array [ + Object { + "expression": Object { + "name": "string", + "type": "NameExpression", + }, + "name": "a", + "type": "ParameterType", + }, + ], + "result": Object { + "fields": Array [ + Object { + "key": "num", + "type": "FieldType", + "value": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "type": "RecordType", + }, + "type": "FunctionType", + }, + "yields": Array [], + }, +] +`; + +exports[`outputs flow-unnamed-params.input.js markdown 1`] = ` +" + +### Table of Contents + +* [x][1] +* [x2][2] +* [T][3] +* [T2][4] +* [T3][5] + +## x + +x + +Type: function ([T][3]): [string][6] + +## x2 + +x2 + +Type: function (a: [T][3]): [string][6] + +## T + +T + +Type: function ([Array][7]<[string][6]>): {num: [number][8]} + +## T2 + +T2 + +Type: function (a: [Array][7]<[string][6]>): {num: [number][8]} + +## T3 + +T3 + +Type: function (a: [string][6]): {num: [number][8]} + +[1]: #x + +[2]: #x2 + +[3]: #t + +[4]: #t2 + +[5]: #t3 + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array + +[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs flow-unnamed-params.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "x", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "x", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "type": "text", + "value": "function (", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ")", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "x2", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "x2", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "type": "text", + "value": "function (", + }, + Object { + "type": "text", + "value": "a: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ")", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "type": "text", + "value": "function (", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ">", + }, + Object { + "type": "text", + "value": ")", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "type": "text", + "value": "{", + }, + Object { + "type": "text", + "value": "num: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "}", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T2", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T2", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "type": "text", + "value": "function (", + }, + Object { + "type": "text", + "value": "a: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ">", + }, + Object { + "type": "text", + "value": ")", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "type": "text", + "value": "{", + }, + Object { + "type": "text", + "value": "num: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "}", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T3", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "T3", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "type": "text", + "value": "function (", + }, + Object { + "type": "text", + "value": "a: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ")", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "type": "text", + "value": "{", + }, + Object { + "type": "text", + "value": "num: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "}", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "#t", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array", + }, + Object { + "identifier": "4", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs import.meta.input.js JSON 1`] = `Array []`; + +exports[`outputs import.meta.input.js markdown 1`] = ` +" + +### Table of Contents +" +`; + +exports[`outputs import.meta.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + ], + "type": "root", +} +`; + +exports[`outputs infer-private.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 178, + "line": 14, + }, + "start": Object { + "column": 0, + "index": 101, + "line": 9, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "C description", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 20, + "index": 100, + "line": 8, + }, + "start": Object { + "column": 0, + "index": 80, + "line": 8, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 142, + "line": 11, + }, + "start": Object { + "column": 2, + "index": 136, + "line": 11, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "m description", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 22, + "index": 133, + "line": 10, + }, + "start": Object { + "column": 2, + "index": 113, + "line": 10, + }, + }, + "memberof": "C", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "m", + "namespace": "C#m", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "C", + }, + Object { + "kind": "function", + "name": "m", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "C", + "namespace": "C", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "C", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs infer-private.input.js markdown 1`] = ` +" + +### Table of Contents + +* [C][1] + * [m][2] + +## C + +C description + +### m + +m description + +[1]: #c + +[2]: #m +" +`; + +exports[`outputs infer-private.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "C", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "C description", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "m", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "m description", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs inheritance.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [ + Object { + "name": "Array", + "title": "augments", + }, + ], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 112, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 52, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "With ES6, built-in types are extensible!", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 51, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "SpecialArray", + "namespace": "SpecialArray", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "SpecialArray", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 42, + "index": 174, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 132, + "line": 9, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 17, + "index": 131, + "line": 8, + }, + "start": Object { + "column": 0, + "index": 114, + "line": 8, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Foo", + "namespace": "Foo", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 0, + "name": "Foo", + "title": "class", + "type": null, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs inheritance.input.js markdown 1`] = ` +" + +### Table of Contents + +* [SpecialArray][1] +* [Foo][2] + +## SpecialArray + +**Extends Array** + +With ES6, built-in types are extensible! + +## Foo + +[1]: #specialarray + +[2]: #foo +" +`; + +exports[`outputs inheritance.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "SpecialArray", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Extends ", + }, + Object { + "type": "text", + "value": "Array", + }, + ], + "type": "strong", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "With ES6, built-in types are extensible!", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Foo", + }, + ], + "depth": 2, + "type": "heading", + }, + ], + "type": "root", +} +`; + +exports[`outputs inline-link.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 133, + "line": 8, + }, + "start": Object { + "column": 0, + "index": 95, + "line": 6, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Adds one to a number", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 94, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "addOne", + "namespace": "addOne", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the input", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "a", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "addOne", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the output", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "the input", + "lineNumber": 2, + "name": "a", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "the output", + "lineNumber": 3, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 540, + "line": 23, + }, + "start": Object { + "column": 0, + "index": 487, + "line": 21, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one. Internally, this uses +", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "addOne", + }, + ], + "jsdoc": true, + "title": null, + "type": "link", + "url": "addOne", + }, + Object { + "type": "text", + "value": " to do the math. This demonstrates +", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Addition", + }, + ], + "jsdoc": true, + "title": null, + "type": "link", + "url": "https://en.wikipedia.org/wiki/Addition", + }, + Object { + "type": "text", + "value": " +and ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "https://en.wikipedia.org/wiki/Addition", + }, + ], + "jsdoc": true, + "title": null, + "type": "link", + "url": "https://en.wikipedia.org/wiki/Addition", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This link refers to nothing: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "nothing", + }, + ], + "jsdoc": true, + "title": null, + "type": "link", + "url": "nothing", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 486, + "line": 20, + }, + "start": Object { + "column": 0, + "index": 135, + "line": 10, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "inline-link.input", + "namespace": "inline-link.input", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the input", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 8, + "name": "a", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "inline-link.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "the input", + "lineNumber": 8, + "name": "a", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "numberone", + "lineNumber": 9, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs inline-link.input.js markdown 1`] = ` +" + +### Table of Contents + +* [addOne][1] + * [Parameters][2] +* [inline-link.input][3] + * [Parameters][4] + +## addOne + +Adds one to a number + +### Parameters + +* \`a\` **[number][5]** the input + +Returns **[number][5]** the output + +## inline-link.input + +This function returns the number one. Internally, this uses +[addOne][1] to do the math. This demonstrates +[Addition][6] +and [https://en.wikipedia.org/wiki/Addition][6] + +This link refers to nothing: [nothing][7] + +### Parameters + +* \`a\` **[number][5]** the input + +Returns **[number][5]** numberone + +[1]: #addone + +[2]: #parameters + +[3]: #inline-linkinput + +[4]: #parameters-1 + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[6]: https://en.wikipedia.org/wiki/Addition + +[7]: nothing +" +`; + +exports[`outputs inline-link.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "addOne", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Adds one to a number", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the input", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the output", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "inline-link.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one. Internally, this uses +", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "addOne", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": " to do the math. This demonstrates +", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Addition", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": " +and ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "https://en.wikipedia.org/wiki/Addition", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This link refers to nothing: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "nothing", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the input", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "#addone", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://en.wikipedia.org/wiki/Addition", + }, + Object { + "identifier": "4", + "title": "", + "type": "definition", + "url": "nothing", + }, + ], + "type": "root", +} +`; + +exports[`outputs interface.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [ + Object { + "name": "Bar", + "title": "extends", + }, + Object { + "name": "Baz", + "title": "extends", + }, + ], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 148, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 33, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my interface.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "interface", + "loc": Object { + "end": Object { + "column": 3, + "index": 32, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 15, + "index": 105, + "line": 6, + }, + "start": Object { + "column": 2, + "index": 92, + "line": 6, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is prop 1", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 23, + "index": 89, + "line": 5, + }, + "start": Object { + "column": 2, + "index": 68, + "line": 5, + }, + }, + "memberof": "Foo", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "prop1", + "namespace": "Foo#prop1", + "params": Array [], + "path": Array [ + Object { + "kind": "interface", + "name": "Foo", + }, + Object { + "kind": "member", + "name": "prop1", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "number", + "type": "NameExpression", + }, + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 15, + "index": 146, + "line": 8, + }, + "start": Object { + "column": 2, + "index": 133, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is prop 2", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "member", + "loc": Object { + "end": Object { + "column": 23, + "index": 130, + "line": 7, + }, + "start": Object { + "column": 2, + "index": 109, + "line": 7, + }, + }, + "memberof": "Foo", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "prop2", + "namespace": "Foo#prop2", + "params": Array [], + "path": Array [ + Object { + "kind": "interface", + "name": "Foo", + }, + Object { + "kind": "member", + "name": "prop2", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "string", + "type": "NameExpression", + }, + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "Foo", + "namespace": "Foo", + "params": Array [], + "path": Array [ + Object { + "kind": "interface", + "name": "Foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs interface.input.js markdown 1`] = ` +" + +### Table of Contents + +* [Foo][1] + * [prop1][2] + * [prop2][3] + +## Foo + +**Extends Bar, Baz** + +This is my interface. + +### prop1 + +This is prop 1 + +Type: [number][4] + +### prop2 + +This is prop 2 + +Type: [string][5] + +[1]: #foo + +[2]: #prop1 + +[3]: #prop2 + +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +" +`; + +exports[`outputs interface.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Extends ", + }, + Object { + "type": "text", + "value": "Bar, Baz", + }, + ], + "type": "strong", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my interface.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "prop1", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is prop 1", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "prop2", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is prop 2", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + ], + "type": "root", +} +`; + +exports[`outputs internal.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 147, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 113, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "I am in ", + }, + Object { + "type": "inlineCode", + "value": "external.input.js", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 112, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 73, + "line": 5, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs internal.input.js markdown 1`] = ` +" + +### Table of Contents + +* [foo][1] + +## foo + +I am in \`external.input.js\`. + +[1]: #foo +" +`; + +exports[`outputs internal.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "I am in ", + }, + Object { + "type": "inlineCode", + "value": "external.input.js", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs lends.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [ + Object { + "description": null, + "lineNumber": 3, + "name": "Augmented", + "title": "augments", + "type": null, + }, + ], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 541, + "line": 28, + }, + "start": Object { + "column": 0, + "index": 72, + "line": 6, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "A neat layout view", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 71, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 20, + "index": 176, + "line": 10, + }, + "start": Object { + "column": 4, + "index": 160, + "line": 10, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "My field", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 19, + "index": 155, + "line": 9, + }, + "start": Object { + "column": 4, + "index": 140, + "line": 9, + }, + }, + "memberof": "TheClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "my-field", + "namespace": "TheClass#my-field", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "TheClass", + }, + Object { + "name": "my-field", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 5, + "index": 360, + "line": 18, + }, + "start": Object { + "column": 4, + "index": 310, + "line": 16, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "My neat function", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 7, + "index": 305, + "line": 15, + }, + "start": Object { + "column": 4, + "index": 182, + "line": 11, + }, + }, + "memberof": "TheClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "TheClass#foo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "word", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "TheClass", + }, + Object { + "kind": "function", + "name": "foo", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word but one better", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": "your word", + "lineNumber": 2, + "name": "word", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": "your word but one better", + "lineNumber": 3, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 5, + "index": 534, + "line": 26, + }, + "start": Object { + "column": 4, + "index": 494, + "line": 24, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "My neat function", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 7, + "index": 489, + "line": 23, + }, + "start": Object { + "column": 4, + "index": 366, + "line": 19, + }, + }, + "memberof": "TheClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "bar", + "namespace": "TheClass#bar", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "word", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "TheClass", + }, + Object { + "kind": "function", + "name": "bar", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word but one better", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": "your word", + "lineNumber": 2, + "name": "word", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": "your word but one better", + "lineNumber": 3, + "title": "returns", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "TheClass", + "namespace": "TheClass", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "TheClass", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "TheClass", + "title": "class", + "type": null, + }, + Object { + "description": null, + "lineNumber": 3, + "name": "Augmented", + "title": "augments", + "type": null, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs lends.input.js markdown 1`] = ` +" + +### Table of Contents + +* [TheClass][1] + * [my-field][2] + * [foo][3] + * [Parameters][4] + * [bar][5] + * [Parameters][6] + +## TheClass + +**Extends Augmented** + +A neat layout view + +### my-field + +My field + +### foo + +My neat function + +#### Parameters + +* \`word\` **[string][7]** your word + +Returns **[string][7]** your word but one better + +### bar + +My neat function + +#### Parameters + +* \`word\` **[string][7]** your word + +Returns **[string][7]** your word but one better + +[1]: #theclass + +[2]: #my-field + +[3]: #foo + +[4]: #parameters + +[5]: #bar + +[6]: #parameters-1 + +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +" +`; + +exports[`outputs lends.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "TheClass", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Extends ", + }, + Object { + "type": "text", + "value": "Augmented", + }, + ], + "type": "strong", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A neat layout view", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "my-field", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "My field", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "My neat function", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "word", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word but one better", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "bar", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "My neat function", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "word", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "your word but one better", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + ], + "type": "root", +} +`; + +exports[`outputs literal_types.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 16, + "index": 70, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 54, + "line": 4, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 53, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "f", + "namespace": "f", + "params": Array [ + Object { + "lineNumber": 1, + "name": "x", + "title": "param", + "type": Object { + "elements": Array [ + Object { + "type": "StringLiteralType", + "value": "a", + }, + Object { + "type": "StringLiteralType", + "value": "b", + }, + Object { + "type": "StringLiteralType", + "value": "", + }, + Object { + "type": "NumericLiteralType", + "value": 0, + }, + Object { + "type": "NumericLiteralType", + "value": -42, + }, + Object { + "type": "NumericLiteralType", + "value": 3.14, + }, + ], + "type": "UnionType", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "f", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 1, + "name": "x", + "title": "param", + "type": Object { + "elements": Array [ + Object { + "type": "StringLiteralType", + "value": "a", + }, + Object { + "type": "StringLiteralType", + "value": "b", + }, + Object { + "type": "StringLiteralType", + "value": "", + }, + Object { + "type": "NumericLiteralType", + "value": 0, + }, + Object { + "type": "NumericLiteralType", + "value": -42, + }, + Object { + "type": "NumericLiteralType", + "value": 3.14, + }, + ], + "type": "UnionType", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 49, + "index": 128, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 79, + "line": 7, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 6, + "index": 78, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 72, + "line": 6, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "g", + "namespace": "g", + "params": Array [ + Object { + "lineNumber": 7, + "name": "x", + "title": "param", + "type": Object { + "elements": Array [ + Object { + "type": "StringLiteralType", + "value": "a", + }, + Object { + "type": "StringLiteralType", + "value": "b", + }, + Object { + "type": "StringLiteralType", + "value": "", + }, + Object { + "type": "NumericLiteralType", + "value": 0, + }, + Object { + "type": "NumericLiteralType", + "value": -42, + }, + Object { + "type": "NumericLiteralType", + "value": 3.14, + }, + ], + "type": "UnionType", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "g", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs literal_types.input.js markdown 1`] = ` +" + +### Table of Contents + +* [f][1] + * [Parameters][2] +* [g][3] + * [Parameters][4] + +## f + +### Parameters + +* \`x\` **(\`\\"a\\"\` | \`\\"b\\"\` | \`\\"\\"\` | \`0\` | \`-42\` | \`3.14\`)** + +## g + +### Parameters + +* \`x\` **(\`\\"a\\"\` | \`\\"b\\"\` | \`\\"\\"\` | \`0\` | \`-42\` | \`3.14\`)** + +[1]: #f + +[2]: #parameters + +[3]: #g + +[4]: #parameters-1 +" +`; + +exports[`outputs literal_types.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "(", + }, + Object { + "type": "inlineCode", + "value": "\\"a\\"", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "\\"b\\"", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "\\"\\"", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "0", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "-42", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "3.14", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "g", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "(", + }, + Object { + "type": "inlineCode", + "value": "\\"a\\"", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "\\"b\\"", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "\\"\\"", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "0", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "-42", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "type": "inlineCode", + "value": "3.14", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "root", +} +`; + +exports[`outputs memberedclass.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 470, + "line": 28, + }, + "start": Object { + "column": 0, + "index": 86, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my class, a demo thing.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "commentLineNumber": 4, + "message": "@memberof reference to com.Test not found", + }, + ], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 85, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "memberof": "com.Test", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 343, + "line": 20, + }, + "start": Object { + "column": 2, + "index": 297, + "line": 18, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get the number 42", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 7, + "index": 294, + "line": 17, + }, + "start": Object { + "column": 2, + "index": 160, + "line": 12, + }, + }, + "memberof": "com.Test.MyClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "getFoo", + "namespace": "MyClass#getFoo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "whether to get the number", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "getIt", + "title": "param", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "MyClass", + }, + Object { + "kind": "function", + "name": "getFoo", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "forty-two", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": "whether to get the number", + "lineNumber": 3, + "name": "getIt", + "title": "param", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + Object { + "description": "forty-two", + "lineNumber": 4, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 26, + "index": 467, + "line": 27, + }, + "start": Object { + "column": 2, + "index": 443, + "line": 27, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get undefined", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 7, + "index": 440, + "line": 26, + }, + "start": Object { + "column": 2, + "index": 347, + "line": 22, + }, + }, + "memberof": "com.Test.MyClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "getUndefined", + "namespace": "MyClass.getUndefined", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "MyClass", + }, + Object { + "kind": "function", + "name": "getUndefined", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "does not return anything.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "type": "UndefinedLiteral", + }, + }, + ], + "scope": "static", + "sees": Array [], + "tags": Array [ + Object { + "description": "does not return anything.", + "lineNumber": 3, + "title": "returns", + "type": Object { + "type": "UndefinedLiteral", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "MyClass", + "namespace": "MyClass", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "MyClass", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 3, + "name": "MyClass", + "title": "class", + "type": null, + }, + Object { + "description": "com.Test", + "lineNumber": 4, + "title": "memberof", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs memberedclass.input.js markdown 1`] = ` +" + +### Table of Contents + +* [MyClass][1] + * [getFoo][2] + * [Parameters][3] + * [getUndefined][4] + +## MyClass + +This is my class, a demo thing. + +### getFoo + +Get the number 42 + +#### Parameters + +* \`getIt\` **[boolean][5]** whether to get the number + +Returns **[number][6]** forty-two + +### getUndefined + +Get undefined + +Returns **[undefined][7]** does not return anything. + +[1]: #myclass + +[2]: #getfoo + +[3]: #parameters + +[4]: #getundefined + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined +" +`; + +exports[`outputs memberedclass.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "MyClass", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is my class, a demo thing.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "getFoo", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get the number 42", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "getIt", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "whether to get the number", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "forty-two", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "getUndefined", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get undefined", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "undefined", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "does not return anything.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined", + }, + ], + "type": "root", +} +`; + +exports[`outputs merge-infered-type.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 150, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 95, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Add five to ", + }, + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 94, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "addFive", + "namespace": "addFive", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The number to add five to.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "addFive", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "x plus five.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "The number to add five to.", + "lineNumber": 3, + "name": "x", + "title": "param", + "type": null, + }, + Object { + "description": "x plus five.", + "lineNumber": 4, + "title": "returns", + "type": null, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs merge-infered-type.input.js markdown 1`] = ` +" + +### Table of Contents + +* [addFive][1] + * [Parameters][2] + +## addFive + +Add five to \`x\`. + +### Parameters + +* \`x\` **[number][3]** The number to add five to. + +Returns **[number][3]** x plus five. + +[1]: #addfive + +[2]: #parameters + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs merge-infered-type.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "addFive", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Add five to ", + }, + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The number to add five to.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "x plus five.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs meta.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 352, + "line": 14, + }, + "start": Object { + "column": 0, + "index": 288, + "line": 11, + }, + }, + }, + "copyright": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Tom MacWright", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "license": "BSD", + "loc": Object { + "end": Object { + "column": 3, + "index": 287, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "meta.input", + "namespace": "meta.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "meta.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "markdown link", + }, + ], + "title": null, + "type": "link", + "url": "http://foo.com/", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "sees", + }, + ], + "since": "2.0.0", + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "This function returns the number one.", + "lineNumber": 3, + "title": "description", + }, + Object { + "description": "[markdown link](http://foo.com/)", + "lineNumber": 4, + "title": "see", + }, + Object { + "description": "1.0.0", + "lineNumber": 5, + "title": "version", + }, + Object { + "description": "2.0.0", + "lineNumber": 6, + "title": "since", + }, + Object { + "description": "Tom MacWright", + "lineNumber": 7, + "title": "copyright", + }, + Object { + "description": "BSD", + "lineNumber": 8, + "title": "license", + }, + ], + "throws": Array [], + "todos": Array [], + "version": "1.0.0", + "yields": Array [], + }, +] +`; + +exports[`outputs meta.input.js markdown 1`] = ` +" + +### Table of Contents + +* [meta.input][1] + +## meta.input + +* **See**: [markdown link][2] + +This function returns the number one. + +Returns **[number][3]** numberone + +**Meta** + +* **version**: 1.0.0 +* **since**: 2.0.0 +* **copyright**: Tom MacWright +* **license**: BSD + +[1]: #metainput + +[2]: http://foo.com/ + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs meta.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "meta.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "See", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "markdown link", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Meta", + }, + ], + "type": "strong", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "version", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "type": "text", + "value": "1.0.0", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "since", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "type": "text", + "value": "2.0.0", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "copyright", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Tom MacWright", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "license", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": ": ", + }, + Object { + "type": "text", + "value": "BSD", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "http://foo.com/", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs multisignature.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 289, + "line": 19, + }, + "start": Object { + "column": 0, + "index": 170, + "line": 13, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get the time", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 73, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 14, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "getTheTime", + "namespace": "getTheTime", + "params": Array [ + Object { + "lineNumber": 13, + "name": "time", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "getTheTime", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the current date", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Date", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "the current date", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "Date", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 289, + "line": 19, + }, + "start": Object { + "column": 0, + "index": 170, + "line": 13, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Set the time", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 169, + "line": 12, + }, + "start": Object { + "column": 0, + "index": 75, + "line": 8, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "getTheTime", + "namespace": "getTheTime", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the current time", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "time", + "title": "param", + "type": Object { + "name": "Date", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "getTheTime", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "nothing", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "type": "UndefinedLiteral", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "the current time", + "lineNumber": 2, + "name": "time", + "title": "param", + "type": Object { + "name": "Date", + "type": "NameExpression", + }, + }, + Object { + "description": "nothing", + "lineNumber": 3, + "title": "returns", + "type": Object { + "type": "UndefinedLiteral", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs multisignature.input.js markdown 1`] = ` +" + +### Table of Contents + +* [getTheTime][1] + * [Parameters][2] +* [getTheTime][3] + * [Parameters][4] + +## getTheTime + +Get the time + +### Parameters + +* \`time\` + +Returns **[Date][5]** the current date + +## getTheTime + +Set the time + +### Parameters + +* \`time\` **[Date][5]** the current time + +Returns **[undefined][6]** nothing + +[1]: #getthetime + +[2]: #parameters + +[3]: #getthetime-1 + +[4]: #parameters-1 + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined +" +`; + +exports[`outputs multisignature.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "getTheTime", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Get the time", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "time", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Date", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the current date", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "getTheTime", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Set the time", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "time", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Date", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the current time", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "undefined", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "nothing", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined", + }, + ], + "type": "root", +} +`; + +exports[`outputs nearby_params.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 585, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 479, + "line": 10, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Attempt to establish a cookie-based session in exchange for credentials.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 478, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "sessions.create", + "namespace": "sessions.create", + "params": Array [ + Object { + "lineNumber": 3, + "name": "credentials", + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Login username. Also accepted as ", + }, + Object { + "type": "inlineCode", + "value": "username", + }, + Object { + "type": "text", + "value": " or ", + }, + Object { + "type": "inlineCode", + "value": "email", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "credentials.name", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Login password", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "credentials.password", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "title": "param", + "type": Object { + "name": "object", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Gets passed ", + }, + Object { + "type": "inlineCode", + "value": "(err, { success:Boolean })", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 6, + "name": "callback", + "title": "param", + "type": Object { + "expression": Object { + "name": "function", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "sessions.create", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "promise, to be resolved on success or rejected on failure", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Promise", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 1, + "name": null, + "title": "function", + }, + Object { + "description": null, + "lineNumber": 2, + "name": "sessions.create", + "title": "name", + }, + Object { + "description": null, + "lineNumber": 3, + "name": "credentials", + "title": "param", + "type": Object { + "name": "object", + "type": "NameExpression", + }, + }, + Object { + "description": "Login username. Also accepted as \`username\` or \`email\`.", + "lineNumber": 4, + "name": "credentials.name", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": "Login password", + "lineNumber": 5, + "name": "credentials.password", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": "Gets passed \`(err, { success:Boolean })\`.", + "lineNumber": 6, + "name": "callback", + "title": "param", + "type": Object { + "expression": Object { + "name": "function", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "description": "promise, to be resolved on success or rejected on failure", + "lineNumber": 7, + "title": "returns", + "type": Object { + "name": "Promise", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs nearby_params.input.js markdown 1`] = ` +" + +### Table of Contents + +* [sessions.create][1] + * [Parameters][2] + +## sessions.create + +Attempt to establish a cookie-based session in exchange for credentials. + +### Parameters + +* \`credentials\` **[object][3]** + + * \`credentials.name\` **[string][4]** Login username. Also accepted as \`username\` or \`email\`. + * \`credentials.password\` **[string][4]** Login password +* \`callback\` **[function][5]?** Gets passed \`(err, { success:Boolean })\`. + +Returns **[Promise][6]** promise, to be resolved on success or rejected on failure + +[1]: #sessionscreate + +[2]: #parameters + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise +" +`; + +exports[`outputs nearby_params.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "sessions.create", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Attempt to establish a cookie-based session in exchange for credentials.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "credentials", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "object", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "credentials.name", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Login username. Also accepted as ", + }, + Object { + "type": "inlineCode", + "value": "username", + }, + Object { + "type": "text", + "value": " or ", + }, + Object { + "type": "inlineCode", + "value": "email", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "credentials.password", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Login password", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "callback", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "function", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Gets passed ", + }, + Object { + "type": "inlineCode", + "value": "(err, { success:Boolean })", + }, + Object { + "type": "text", + "value": ".", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Promise", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "promise, to be resolved on success or rejected on failure", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function", + }, + Object { + "identifier": "4", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise", + }, + ], + "type": "root", +} +`; + +exports[`outputs nest_events.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 6, + "index": 114, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 108, + "line": 13, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Klass description", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 48, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 6, + "index": 114, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 108, + "line": 13, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Klass event", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "event", + "loc": Object { + "end": Object { + "column": 3, + "index": 107, + "line": 12, + }, + "start": Object { + "column": 1, + "index": 52, + "line": 8, + }, + }, + "memberof": "Klass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "bar", + "namespace": "Klass.event:bar", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Klass", + }, + Object { + "kind": "event", + "name": "bar", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "bar", + "lineNumber": 2, + "title": "event", + }, + Object { + "description": "Klass", + "lineNumber": 3, + "title": "memberof", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Klass", + "namespace": "Klass", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Klass", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 3, + "name": "Klass", + "title": "class", + "type": null, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs nest_events.input.js markdown 1`] = ` +" + +### Table of Contents + +* [Klass][1] + * [bar][2] + +## Klass + +Klass description + +### bar + +Klass event + +[1]: #klass + +[2]: #bar +" +`; + +exports[`outputs nest_events.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Klass", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Klass description", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "bar", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Klass event", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs nest_params.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 32, + "index": 314, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 282, + "line": 7, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 281, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The employees who are responsible for the project.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 1, + "name": "employees", + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The name of an employee.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "employees[].name", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The employee's department.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "employees[].department", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "Object", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + Object { + "default": "minion", + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The employee's type.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "type", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "The employees who are responsible for the project.", + "lineNumber": 1, + "name": "employees", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "Object", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + Object { + "description": "The name of an employee.", + "lineNumber": 2, + "name": "employees[].name", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "description": "The employee's department.", + "lineNumber": 3, + "name": "employees[].department", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "default": "minion", + "description": "The employee's type.", + "lineNumber": 4, + "name": "type", + "title": "param", + "type": Object { + "expression": Object { + "name": "string", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 32, + "index": 314, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 282, + "line": 7, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 3, + "index": 654, + "line": 19, + }, + "start": Object { + "column": 0, + "index": 316, + "line": 9, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "some options", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "options", + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "how much", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "options.much", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "title": "param", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "something else", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "bar", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "name": "foo", + }, + ], + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the current time", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "theTime", + "properties": Array [ + Object { + "lineNumber": 6, + "name": "theTime.hours", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "lineNumber": 7, + "name": "theTime.minutes", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "lineNumber": 8, + "name": "theTime.seconds", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "title": "property", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + ], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo something else", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 1, + "name": "foo", + "title": "name", + }, + Object { + "description": "some options", + "lineNumber": 2, + "name": "options", + "title": "param", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + Object { + "description": "how much", + "lineNumber": 3, + "name": "options.much", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "something else", + "lineNumber": 4, + "name": "bar", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "the current time", + "lineNumber": 5, + "name": "theTime", + "title": "property", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + Object { + "description": null, + "lineNumber": 6, + "name": "theTime.hours", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": null, + "lineNumber": 7, + "name": "theTime.minutes", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": null, + "lineNumber": 8, + "name": "theTime.seconds", + "title": "property", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "foo something else", + "lineNumber": 9, + "title": "returns", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs nest_params.input.js markdown 1`] = ` +" + +### Table of Contents + +* [foo][1] + * [Parameters][2] +* [foo][3] + * [Parameters][4] + * [Properties][5] + +## foo + +### Parameters + +* \`employees\` **[Array][6]<[Object][7]>** The employees who are responsible for the project. + + * \`employees[].name\` **[string][8]** The name of an employee. + * \`employees[].department\` **[string][8]** The employee's department. +* \`type\` **[string][8]** The employee's type. (optional, default \`minion\`) + +## foo + +### Parameters + +* \`options\` **[Object][7]** some options + + * \`options.much\` **[number][9]** how much +* \`bar\` **[number][9]** something else + +### Properties + +* \`theTime\` **[Object][7]** the current time + + * \`theTime.hours\` **[number][9]** + * \`theTime.minutes\` **[number][9]** + * \`theTime.seconds\` **[number][9]** + +Returns **[Object][7]** foo something else + +[1]: #foo + +[2]: #parameters + +[3]: #foo-1 + +[4]: #parameters-1 + +[5]: #properties + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array + +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs nest_params.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "employees", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ">", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The employees who are responsible for the project.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "employees[].name", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The name of an employee.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "employees[].department", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The employee's department.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "type", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The employee's type.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "minion", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "some options", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options.much", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "how much", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "bar", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "something else", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Properties", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "theTime", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the current time", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "theTime.hours", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "theTime.minutes", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "theTime.seconds", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo something else", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + Object { + "identifier": "4", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs newline-in-description.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 0, + "index": 185, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "A function.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "message": "could not determine @name for hierarchy", + }, + ], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 3, + "index": 184, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "namespace": "", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The input to the function. +I should be able to continue the description on a new line, and have it +still work in the markdown table.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "a", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "path": Array [], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "The input to the function. +I should be able to continue the description on a new line, and have it +still work in the markdown table.", + "lineNumber": 2, + "name": "a", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs newline-in-description.input.js markdown 1`] = ` +" + +### Table of Contents + +* [][1] + * [Parameters][2] + +## + +A function. + +### Parameters + +* \`a\` **[Number][3]** The input to the function. + I should be able to continue the description on a new line, and have it + still work in the markdown table. + +[1]: # + +[2]: #parameters + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs newline-in-description.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A function.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The input to the function. +I should be able to continue the description on a new line, and have it +still work in the markdown table.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs no-name.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 0, + "index": 47, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Set the time", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "message": "could not determine @name for hierarchy", + }, + ], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 3, + "index": 46, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "namespace": "", + "params": Array [ + Object { + "lineNumber": 2, + "name": "bar", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "bar", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs no-name.input.js markdown 1`] = ` +" + +### Table of Contents + +* [][1] + * [Parameters][2] + +## + +Set the time + +### Parameters + +* \`bar\` **[number][3]** + +[1]: # + +[2]: #parameters + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs no-name.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Set the time", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "bar", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs optional-record-field-type.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 55, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 7, + "line": 2, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 6, + "index": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Record", + "namespace": "Record", + "params": Array [], + "path": Array [ + Object { + "kind": "typedef", + "name": "Record", + }, + ], + "properties": Array [ + Object { + "lineNumber": 3, + "name": "opt", + "title": "property", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "lineNumber": 4, + "name": "req", + "title": "property", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + ], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs optional-record-field-type.input.js markdown 1`] = ` +" + +### Table of Contents + +* [Record][1] + * [Properties][2] + +## Record + +### Properties + +* \`opt\` **[number][3]?** +* \`req\` **[string][4]** + +[1]: #record + +[2]: #properties + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +" +`; + +exports[`outputs optional-record-field-type.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Record", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Properties", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "opt", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "req", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + ], + "type": "root", +} +`; + +exports[`outputs params.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 161, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 87, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 86, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "addThem", + "namespace": "addThem", + "params": Array [ + Object { + "lineNumber": 5, + "name": "a", + "title": "param", + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the second param", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "b", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "lineNumber": 5, + "name": "c", + "title": "param", + }, + Object { + "anonymous": true, + "name": "$3", + "properties": Array [ + Object { + "lineNumber": 5, + "name": "$3.d", + "title": "param", + }, + Object { + "lineNumber": 5, + "name": "$3.e", + "title": "param", + }, + Object { + "lineNumber": 5, + "name": "$3.f", + "title": "param", + }, + ], + "title": "param", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "addThem", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "the second param", + "lineNumber": 2, + "name": "b", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 372, + "line": 16, + }, + "start": Object { + "column": 0, + "index": 301, + "line": 14, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method has partially inferred params", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 300, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 163, + "line": 9, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "fishesAndFoxes", + "namespace": "fishesAndFoxes", + "params": Array [ + Object { + "lineNumber": 2, + "name": "options", + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number of kinds of fish", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "options.fishes", + "title": "param", + "type": Object { + "name": "String", + "type": "NameExpression", + }, + }, + Object { + "lineNumber": 14, + "name": "options.foxes", + "title": "param", + }, + ], + "title": "param", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "fishesAndFoxes", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "options", + "title": "param", + "type": Object { + "name": "Object", + "type": "NameExpression", + }, + }, + Object { + "description": "number of kinds of fish", + "lineNumber": 3, + "name": "options.fishes", + "title": "param", + "type": Object { + "name": "String", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 517, + "line": 24, + }, + "start": Object { + "column": 0, + "index": 474, + "line": 22, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method has a type in the description and a default in the code", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 473, + "line": 21, + }, + "start": Object { + "column": 0, + "index": 374, + "line": 18, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "withDefault", + "namespace": "withDefault", + "params": Array [ + Object { + "default": "2", + "lineNumber": 2, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "withDefault", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 653, + "line": 35, + }, + "start": Object { + "column": 0, + "index": 558, + "line": 29, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is foo's documentation", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 557, + "line": 28, + }, + "start": Object { + "column": 0, + "index": 519, + "line": 26, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 14, + "index": 651, + "line": 34, + }, + "start": Object { + "column": 2, + "index": 639, + "line": 34, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The method", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 5, + "index": 636, + "line": 33, + }, + "start": Object { + "column": 2, + "index": 572, + "line": 30, + }, + }, + "memberof": "Foo", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "method", + "namespace": "Foo#method", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Param to method", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 2, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Foo", + }, + Object { + "kind": "function", + "name": "method", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [ + Object { + "description": "Param to method", + "lineNumber": 2, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "Foo", + "namespace": "Foo", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 822, + "line": 47, + }, + "start": Object { + "column": 0, + "index": 685, + "line": 40, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Traditional object", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 3, + "index": 684, + "line": 39, + }, + "start": Object { + "column": 0, + "index": 655, + "line": 37, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 819, + "line": 46, + }, + "start": Object { + "column": 2, + "index": 769, + "line": 44, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method should acquire the param x", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 5, + "index": 766, + "line": 43, + }, + "start": Object { + "column": 2, + "index": 713, + "line": 41, + }, + }, + "memberof": "TraditionalObject", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "traditionalMethod", + "namespace": "TraditionalObject.traditionalMethod", + "params": Array [ + Object { + "lineNumber": 44, + "name": "x", + "title": "param", + }, + ], + "path": Array [ + Object { + "name": "TraditionalObject", + }, + Object { + "kind": "function", + "name": "traditionalMethod", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + }, + "name": "TraditionalObject", + "namespace": "TraditionalObject", + "params": Array [], + "path": Array [ + Object { + "name": "TraditionalObject", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 22, + "index": 1216, + "line": 61, + }, + "start": Object { + "column": 0, + "index": 1194, + "line": 61, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Represents an IPv6 address", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of optional parameters", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [ + Object { + "description": "var address = new Address6('2001::/32');", + }, + ], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 1193, + "line": 60, + }, + "start": Object { + "column": 0, + "index": 824, + "line": 49, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Address6", + "namespace": "Address6", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "An IPv6 address string", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "address", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "default": "8", + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "How many octets to parse", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 6, + "name": "groups", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "A third argument", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 7, + "name": "third", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "prefix": true, + "type": "NullableType", + }, + }, + Object { + "default": "[1]", + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "to properly be parsed", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 8, + "name": "foo", + "title": "param", + "type": Object { + "name": "Array", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Address6", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 4, + "name": "Address6", + "title": "class", + "type": null, + }, + Object { + "description": "An IPv6 address string", + "lineNumber": 5, + "name": "address", + "title": "param", + "type": Object { + "name": "string", + "type": "NameExpression", + }, + }, + Object { + "default": "8", + "description": "How many octets to parse", + "lineNumber": 6, + "name": "groups", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "description": "A third argument", + "lineNumber": 7, + "name": "third", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "prefix": true, + "type": "NullableType", + }, + }, + Object { + "default": "[1]", + "description": "to properly be parsed", + "lineNumber": 8, + "name": "foo", + "title": "param", + "type": Object { + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "description": "var address = new Address6('2001::/32');", + "lineNumber": 9, + "title": "example", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 1833, + "line": 77, + }, + "start": Object { + "column": 0, + "index": 1772, + "line": 75, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Create a GeoJSON data source instance given an options object", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of nested parameters", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 1771, + "line": 74, + }, + "start": Object { + "column": 0, + "index": 1218, + "line": 63, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "GeoJSONSource", + "namespace": "GeoJSONSource", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "optional options", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "options", + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "A GeoJSON data object or URL to it. +The latter is preferable in case of large GeoJSON files.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 6, + "name": "options.data", + "title": "param", + "type": Object { + "elements": Array [ + Object { + "name": "Object", + "type": "NameExpression", + }, + Object { + "name": "string", + "type": "NameExpression", + }, + ], + "type": "UnionType", + }, + }, + Object { + "default": "14", + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Maximum zoom to preserve detail at.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 8, + "name": "options.maxzoom", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Tile buffer on each side.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 9, + "name": "options.buffer", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Simplification tolerance (higher means simpler).", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 10, + "name": "options.tolerance", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + ], + "title": "param", + "type": Object { + "expression": Object { + "name": "Object", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "GeoJSONSource", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 4, + "name": "GeoJSONSource", + "title": "class", + "type": null, + }, + Object { + "description": "optional options", + "lineNumber": 5, + "name": "options", + "title": "param", + "type": Object { + "expression": Object { + "name": "Object", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "description": "A GeoJSON data object or URL to it. +The latter is preferable in case of large GeoJSON files.", + "lineNumber": 6, + "name": "options.data", + "title": "param", + "type": Object { + "elements": Array [ + Object { + "name": "Object", + "type": "NameExpression", + }, + Object { + "name": "string", + "type": "NameExpression", + }, + ], + "type": "UnionType", + }, + }, + Object { + "default": "14", + "description": "Maximum zoom to preserve detail at.", + "lineNumber": 8, + "name": "options.maxzoom", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "description": "Tile buffer on each side.", + "lineNumber": 9, + "name": "options.buffer", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + Object { + "description": "Simplification tolerance (higher means simpler).", + "lineNumber": 10, + "name": "options.tolerance", + "title": "param", + "type": Object { + "expression": Object { + "name": "number", + "type": "NameExpression", + }, + "type": "OptionalType", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 37, + "index": 2052, + "line": 87, + }, + "start": Object { + "column": 0, + "index": 2015, + "line": 87, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support for parameters with explicit types but with default +values specified in code.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "constant", + "loc": Object { + "end": Object { + "column": 3, + "index": 2014, + "line": 86, + }, + "start": Object { + "column": 0, + "index": 1835, + "line": 79, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "myfunc", + "namespace": "myfunc", + "params": Array [ + Object { + "default": "123", + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "an argument", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "constant", + "name": "myfunc", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "some", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "an argument", + "lineNumber": 4, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + Object { + "description": "some", + "lineNumber": 6, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 2283, + "line": 97, + }, + "start": Object { + "column": 0, + "index": 2240, + "line": 95, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of JSDoc param tags without type information, +or any type information we could infer from annotations.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 2239, + "line": 94, + }, + "start": Object { + "column": 0, + "index": 2054, + "line": 89, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "foo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "An IPv6 address string", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "address", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "foo", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "An IPv6 address string", + "lineNumber": 4, + "name": "address", + "title": "param", + "type": null, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 2629, + "line": 111, + }, + "start": Object { + "column": 0, + "index": 2570, + "line": 109, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support for iterator rest inside an +iterator destructure (RestElement)", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 2569, + "line": 108, + }, + "start": Object { + "column": 0, + "index": 2285, + "line": 99, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "rotate", + "namespace": "rotate", + "params": Array [ + Object { + "lineNumber": 4, + "name": "input", + "properties": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "head of iterator", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "input.0", + "title": "param", + "type": Object { + "name": "any", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "body of iterator", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 6, + "name": "input.xs", + "title": "param", + "type": Object { + "expression": Object { + "name": "any", + "type": "NameExpression", + }, + "type": "RestType", + }, + }, + ], + "title": "param", + "type": Object { + "name": "Array", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "rotate", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "rotated such that the last element was the first", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "applications": Array [ + Object { + "name": "any", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 4, + "name": "input", + "title": "param", + "type": Object { + "name": "Array", + "type": "NameExpression", + }, + }, + Object { + "description": "head of iterator", + "lineNumber": 5, + "name": "input.0", + "title": "param", + "type": Object { + "name": "any", + "type": "NameExpression", + }, + }, + Object { + "description": "body of iterator", + "lineNumber": 6, + "name": "input.xs", + "title": "param", + "type": Object { + "expression": Object { + "name": "any", + "type": "NameExpression", + }, + "type": "RestType", + }, + }, + Object { + "description": "rotated such that the last element was the first", + "lineNumber": 8, + "title": "returns", + "type": Object { + "applications": Array [ + Object { + "name": "any", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs params.input.js markdown 1`] = ` +" + +### Table of Contents + +* [addThem][1] + * [Parameters][2] +* [fishesAndFoxes][3] + * [Parameters][4] +* [withDefault][5] + * [Parameters][6] +* [Foo][7] + * [method][8] + * [Parameters][9] +* [TraditionalObject][10] + * [traditionalMethod][11] + * [Parameters][12] +* [Address6][13] + * [Parameters][14] + * [Examples][15] +* [GeoJSONSource][16] + * [Parameters][17] +* [myfunc][18] + * [Parameters][19] +* [foo][20] + * [Parameters][21] +* [rotate][22] + * [Parameters][23] + +## addThem + +This function returns the number one. + +### Parameters + +* \`a\` +* \`b\` **[number][24]** the second param +* \`c\` +* \`$3\` **[Object][25]** + + * \`$3.d\` + * \`$3.e\` + * \`$3.f\` + +## fishesAndFoxes + +This method has partially inferred params + +### Parameters + +* \`options\` **[Object][25]** + + * \`options.fishes\` **[String][26]** number of kinds of fish + * \`options.foxes\` + +## withDefault + +This method has a type in the description and a default in the code + +### Parameters + +* \`x\` **[number][24]** (optional, default \`2\`) + +## Foo + +This is foo's documentation + +### method + +The method + +#### Parameters + +* \`x\` **[number][24]** Param to method + +## TraditionalObject + +Traditional object + +### traditionalMethod + +This method should acquire the param x + +#### Parameters + +* \`x\` + +## Address6 + +Represents an IPv6 address + +This tests our support of optional parameters + +### Parameters + +* \`address\` **[string][26]** An IPv6 address string +* \`groups\` **[number][24]** How many octets to parse (optional, default \`8\`) +* \`third\` **[number][24]?** A third argument +* \`foo\` **[Array][27]** to properly be parsed (optional, default \`[1]\`) + +### Examples + +\`\`\`javascript +var address = new Address6('2001::/32'); +\`\`\` + +## GeoJSONSource + +Create a GeoJSON data source instance given an options object + +This tests our support of nested parameters + +### Parameters + +* \`options\` **[Object][25]?** optional options + + * \`options.data\` **([Object][25] | [string][26])** A GeoJSON data object or URL to it. + The latter is preferable in case of large GeoJSON files. + * \`options.maxzoom\` **[number][24]** Maximum zoom to preserve detail at. (optional, default \`14\`) + * \`options.buffer\` **[number][24]?** Tile buffer on each side. + * \`options.tolerance\` **[number][24]?** Simplification tolerance (higher means simpler). + +## myfunc + +This tests our support for parameters with explicit types but with default +values specified in code. + +### Parameters + +* \`x\` **[number][24]** an argument (optional, default \`123\`) + +Returns **[number][24]** some + +## foo + +This tests our support of JSDoc param tags without type information, +or any type information we could infer from annotations. + +### Parameters + +* \`address\` An IPv6 address string + +## rotate + +This tests our support for iterator rest inside an +iterator destructure (RestElement) + +### Parameters + +* \`input\` **[Array][27]** + + * \`input.0\` **any** head of iterator + * \`input.xs\` **...any** body of iterator + +Returns **[Array][27]\\\\** rotated such that the last element was the first + +[1]: #addthem + +[2]: #parameters + +[3]: #fishesandfoxes + +[4]: #parameters-1 + +[5]: #withdefault + +[6]: #parameters-2 + +[7]: #foo + +[8]: #method + +[9]: #parameters-3 + +[10]: #traditionalobject + +[11]: #traditionalmethod + +[12]: #parameters-4 + +[13]: #address6 + +[14]: #parameters-5 + +[15]: #examples + +[16]: #geojsonsource + +[17]: #parameters-6 + +[18]: #myfunc + +[19]: #parameters-7 + +[20]: #foo-1 + +[21]: #parameters-8 + +[22]: #rotate + +[23]: #parameters-9 + +[24]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[25]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array +" +`; + +exports[`outputs params.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "addThem", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "b", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the second param", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "c", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$3", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$3.d", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$3.e", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "$3.f", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "fishesAndFoxes", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method has partially inferred params", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options.fishes", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "String", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "number of kinds of fish", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options.foxes", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "withDefault", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method has a type in the description and a default in the code", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "2", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This is foo's documentation", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "method", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The method", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Param to method", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "TraditionalObject", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Traditional object", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "traditionalMethod", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This method should acquire the param x", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Address6", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Represents an IPv6 address", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of optional parameters", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "address", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "An IPv6 address string", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "groups", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "How many octets to parse", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "8", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "third", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A third argument", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "foo", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "to properly be parsed", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "[1]", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Examples", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "lang": "javascript", + "type": "code", + "value": "var address = new Address6('2001::/32');", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "GeoJSONSource", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Create a GeoJSON data source instance given an options object", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of nested parameters", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "optional options", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options.data", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "(", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Object", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": " | ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A GeoJSON data object or URL to it. +The latter is preferable in case of large GeoJSON files.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options.maxzoom", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Maximum zoom to preserve detail at.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "14", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options.buffer", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Tile buffer on each side.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "options.tolerance", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Simplification tolerance (higher means simpler).", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "myfunc", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support for parameters with explicit types but with default +values specified in code.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "an argument", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": " (optional, default ", + }, + Object { + "type": "inlineCode", + "value": "123", + }, + Object { + "type": "text", + "value": ")", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "some", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support of JSDoc param tags without type information, +or any type information we could infer from annotations.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "address", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "An IPv6 address string", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "rotate", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This tests our support for iterator rest inside an +iterator destructure (RestElement)", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "input", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "input.0", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "any", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "head of iterator", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "input.xs", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "...", + }, + Object { + "type": "text", + "value": "any", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "body of iterator", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "type": "text", + "value": "any", + }, + Object { + "type": "text", + "value": ">", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "rotated such that the last element was the first", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + Object { + "identifier": "4", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array", + }, + ], + "type": "root", +} +`; + +exports[`outputs react-jsx.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 20, + "index": 38, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 18, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "apples", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 17, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "apples", + "namespace": "apples", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "apples", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs react-jsx.input.js markdown 1`] = ` +" + +### Table of Contents + +* [apples][1] + +## apples + +apples + +[1]: #apples +" +`; + +exports[`outputs react-jsx.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "apples", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "apples", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs require-json.input.js JSON 1`] = `Array []`; + +exports[`outputs require-json.input.js markdown 1`] = ` +" + +### Table of Contents +" +`; + +exports[`outputs require-json.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + ], + "type": "root", +} +`; + +exports[`outputs require-json-no-extension.input.js JSON 1`] = `Array []`; + +exports[`outputs require-json-no-extension.input.js markdown 1`] = ` +" + +### Table of Contents +" +`; + +exports[`outputs require-json-no-extension.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + ], + "type": "root", +} +`; + +exports[`outputs sections.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 19, + "index": 53, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 34, + "line": 4, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function is first", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 33, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "first", + "namespace": "first", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "first", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 16, + "index": 194, + "line": 12, + }, + "start": Object { + "column": 2, + "index": 180, + "line": 12, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "forgot a memberof here... sure hope that doesn't crash anything!", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 5, + "index": 177, + "line": 11, + }, + "start": Object { + "column": 2, + "index": 79, + "line": 8, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "first", + "namespace": "first", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "first", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "first", + "title": "method", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 333, + "line": 19, + }, + "start": Object { + "column": 0, + "index": 62, + "line": 7, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 6, + "index": 61, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 55, + "line": 6, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 13, + "index": 331, + "line": 18, + }, + "start": Object { + "column": 2, + "index": 320, + "line": 18, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "shares a name with a top level item referenced in the TOC... sure hope +that doesn't crash anything!", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 5, + "index": 317, + "line": 17, + }, + "start": Object { + "column": 2, + "index": 198, + "line": 14, + }, + }, + "memberof": "AClass", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "second", + "namespace": "AClass#second", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "AClass", + }, + Object { + "kind": "function", + "name": "second", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "AClass", + "namespace": "AClass", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "AClass", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 20, + "index": 394, + "line": 24, + }, + "start": Object { + "column": 0, + "index": 374, + "line": 24, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This class has some members", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 373, + "line": 23, + }, + "start": Object { + "column": 0, + "index": 335, + "line": 21, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 41, + "index": 460, + "line": 29, + }, + "start": Object { + "column": 0, + "index": 419, + "line": 29, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "second::foo", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 418, + "line": 28, + }, + "start": Object { + "column": 0, + "index": 396, + "line": 26, + }, + }, + "memberof": "second", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": "second#foo", + "params": Array [ + Object { + "lineNumber": 29, + "name": "pork", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "second", + }, + Object { + "kind": "function", + "name": "foo", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 48, + "index": 533, + "line": 34, + }, + "start": Object { + "column": 0, + "index": 485, + "line": 34, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "second::bar", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 484, + "line": 33, + }, + "start": Object { + "column": 0, + "index": 462, + "line": 31, + }, + }, + "memberof": "second", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "bar", + "namespace": "second#bar", + "params": Array [ + Object { + "lineNumber": 34, + "name": "beans", + "title": "param", + }, + Object { + "lineNumber": 34, + "name": "rice", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "second", + }, + Object { + "kind": "function", + "name": "bar", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "second", + "namespace": "second", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "second", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 19, + "index": 588, + "line": 39, + }, + "start": Object { + "column": 0, + "index": 569, + "line": 39, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function is third", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 568, + "line": 38, + }, + "start": Object { + "column": 0, + "index": 535, + "line": 36, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "third", + "namespace": "third", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "third", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs sections.input.js markdown 1`] = ` +" + +### Table of Contents + +* [first][1] +* [first][2] +* [AClass][3] + * [second][4] +* [second][5] + * [foo][6] + * [Parameters][7] + * [bar][8] + * [Parameters][9] +* [third][10] + +## first + +This function is first + +## first + +forgot a memberof here... sure hope that doesn't crash anything! + +## AClass + +### second + +shares a name with a top level item referenced in the TOC... sure hope +that doesn't crash anything! + +## second + +This class has some members + +### foo + +second::foo + +#### Parameters + +* \`pork\` + +### bar + +second::bar + +#### Parameters + +* \`beans\` +* \`rice\` + +## third + +This function is third + +[1]: #first + +[2]: #first-1 + +[3]: #aclass + +[4]: #second + +[5]: #second-1 + +[6]: #foo + +[7]: #parameters + +[8]: #bar + +[9]: #parameters-1 + +[10]: #third +" +`; + +exports[`outputs sections.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "first", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function is first", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "first", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "forgot a memberof here... sure hope that doesn't crash anything!", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "AClass", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "second", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "shares a name with a top level item referenced in the TOC... sure hope +that doesn't crash anything!", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "second", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This class has some members", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "second::foo", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "pork", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "bar", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "second::bar", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 4, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "beans", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "rice", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "third", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function is third", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs simple.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 144, + "line": 8, + }, + "start": Object { + "column": 0, + "index": 80, + "line": 5, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 79, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "simple.input", + "namespace": "simple.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "simple.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs simple.input.js markdown 1`] = ` +" + +### Table of Contents + +* [simple.input][1] + +## simple.input + +This function returns the number one. + +Returns **[number][2]** numberone + +[1]: #simpleinput + +[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs simple.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "simple.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs simple-callback.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 238, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 180, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This takes a number and a callback and calls the callback with the number +plus 3.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 179, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "takesSimpleCallback", + "namespace": "takesSimpleCallback", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The number.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "n", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The callback.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "cb", + "title": "param", + "type": Object { + "name": "simpleCallback", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "takesSimpleCallback", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "The number.", + "lineNumber": 4, + "name": "n", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + Object { + "description": "The callback.", + "lineNumber": 5, + "name": "cb", + "title": "param", + "type": Object { + "name": "simpleCallback", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 238, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 180, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This callback takes an error and a number.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "typedef", + "loc": Object { + "end": Object { + "column": 3, + "index": 395, + "line": 18, + }, + "start": Object { + "column": 0, + "index": 240, + "line": 12, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "simpleCallback", + "namespace": "simpleCallback", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The error.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 4, + "name": "err", + "title": "param", + "type": Object { + "expression": Object { + "name": "Error", + "type": "NameExpression", + }, + "prefix": true, + "type": "NullableType", + }, + }, + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The number.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 5, + "name": "n", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "typedef", + "name": "simpleCallback", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": "simpleCallback", + "lineNumber": 3, + "title": "callback", + }, + Object { + "description": "The error.", + "lineNumber": 4, + "name": "err", + "title": "param", + "type": Object { + "expression": Object { + "name": "Error", + "type": "NameExpression", + }, + "prefix": true, + "type": "NullableType", + }, + }, + Object { + "description": "The number.", + "lineNumber": 5, + "name": "n", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "type": Object { + "name": "Function", + "type": "NameExpression", + }, + "yields": Array [], + }, +] +`; + +exports[`outputs simple-callback.input.js markdown 1`] = ` +" + +### Table of Contents + +* [takesSimpleCallback][1] + * [Parameters][2] +* [simpleCallback][3] + * [Parameters][4] + +## takesSimpleCallback + +This takes a number and a callback and calls the callback with the number +plus 3. + +### Parameters + +* \`n\` **[Number][5]** The number. +* \`cb\` **[simpleCallback][3]** The callback. + +## simpleCallback + +This callback takes an error and a number. + +Type: [Function][6] + +### Parameters + +* \`err\` **[Error][7]?** The error. +* \`n\` **[Number][5]** The number. + +[1]: #takessimplecallback + +[2]: #parameters + +[3]: #simplecallback + +[4]: #parameters-1 + +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function + +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error +" +`; + +exports[`outputs simple-callback.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "takesSimpleCallback", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This takes a number and a callback and calls the callback with the number +plus 3.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "n", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The number.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "cb", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "simpleCallback", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The callback.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "simpleCallback", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This callback takes an error and a number.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Type: ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Function", + }, + ], + "identifier": "3", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "err", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Error", + }, + ], + "identifier": "4", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "?", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The error.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "n", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The number.", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "#simplecallback", + }, + Object { + "identifier": "3", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function", + }, + Object { + "identifier": "4", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error", + }, + ], + "type": "root", +} +`; + +exports[`outputs simple-hashbang.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 165, + "line": 10, + }, + "start": Object { + "column": 0, + "index": 101, + "line": 7, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 100, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 21, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "simple-hashbang.input", + "namespace": "simple-hashbang.input", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "simple-hashbang.input", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "numberone", + "lineNumber": 2, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs simple-hashbang.input.js markdown 1`] = ` +" + +### Table of Contents + +* [simple-hashbang.input][1] + +## simple-hashbang.input + +This function returns the number one. + +Returns **[Number][2]** numberone + +[1]: #simple-hashbanginput + +[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs simple-hashbang.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "simple-hashbang.input", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number one.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numberone", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs simple-private.input.js JSON 1`] = `Array []`; + +exports[`outputs simple-private.input.js markdown 1`] = ` +" + +### Table of Contents +" +`; + +exports[`outputs simple-private.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + ], + "type": "root", +} +`; + +exports[`outputs simple-singlestar.input.js JSON 1`] = `Array []`; + +exports[`outputs simple-singlestar.input.js markdown 1`] = ` +" + +### Table of Contents +" +`; + +exports[`outputs simple-singlestar.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + ], + "type": "root", +} +`; + +exports[`outputs simple-triplestar.input.js JSON 1`] = `Array []`; + +exports[`outputs simple-triplestar.input.js markdown 1`] = ` +" + +### Table of Contents +" +`; + +exports[`outputs simple-triplestar.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + ], + "type": "root", +} +`; + +exports[`outputs simple-two.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 245, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 180, + "line": 10, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number plus two.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [ + Object { + "description": "var result = returnTwo(4); +// result is 6", + }, + ], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 3, + "index": 179, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "returnTwo", + "namespace": "returnTwo", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "the number", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "a", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "returnTwo", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "numbertwo", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [ + Object { + "description": "the number", + "lineNumber": 3, + "name": "a", + "title": "param", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + Object { + "description": "numbertwo", + "lineNumber": 4, + "title": "returns", + "type": Object { + "name": "Number", + "type": "NameExpression", + }, + }, + Object { + "description": "var result = returnTwo(4); +// result is 6", + "lineNumber": 5, + "title": "example", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs simple-two.input.js markdown 1`] = ` +" + +### Table of Contents + +* [returnTwo][1] + * [Parameters][2] + * [Examples][3] + +## returnTwo + +This function returns the number plus two. + +### Parameters + +* \`a\` **[Number][4]** the number + +### Examples + +\`\`\`javascript +var result = returnTwo(4); +// result is 6 +\`\`\` + +Returns **[Number][4]** numbertwo + +[1]: #returntwo + +[2]: #parameters + +[3]: #examples + +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number +" +`; + +exports[`outputs simple-two.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "returnTwo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "This function returns the number plus two.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "a", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "the number", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Examples", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "lang": "javascript", + "type": "code", + "value": "var result = returnTwo(4); +// result is 6", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "numbertwo", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + ], + "type": "root", +} +`; + +exports[`outputs sort-order-alpha.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 176, + "line": 19, + }, + "start": Object { + "column": 0, + "index": 93, + "line": 10, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 6, + "index": 92, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 86, + "line": 9, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 174, + "line": 18, + }, + "start": Object { + "column": 2, + "index": 168, + "line": 18, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 165, + "line": 17, + }, + "start": Object { + "column": 2, + "index": 159, + "line": 17, + }, + }, + "memberof": "C", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "A", + "namespace": "C#A", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "C", + }, + Object { + "kind": "function", + "name": "A", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 156, + "line": 16, + }, + "start": Object { + "column": 2, + "index": 150, + "line": 16, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 147, + "line": 15, + }, + "start": Object { + "column": 2, + "index": 141, + "line": 15, + }, + }, + "memberof": "C", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "a", + "namespace": "C#a", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "C", + }, + Object { + "kind": "function", + "name": "a", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 138, + "line": 14, + }, + "start": Object { + "column": 2, + "index": 132, + "line": 14, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 129, + "line": 13, + }, + "start": Object { + "column": 2, + "index": 123, + "line": 13, + }, + }, + "memberof": "C", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "B", + "namespace": "C#B", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "C", + }, + Object { + "kind": "function", + "name": "B", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 120, + "line": 12, + }, + "start": Object { + "column": 2, + "index": 114, + "line": 12, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 111, + "line": 11, + }, + "start": Object { + "column": 2, + "index": 105, + "line": 11, + }, + }, + "memberof": "C", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "b", + "namespace": "C#b", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "C", + }, + Object { + "kind": "function", + "name": "b", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "C", + "namespace": "C", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "C", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 1, + "index": 268, + "line": 31, + }, + "start": Object { + "column": 0, + "index": 185, + "line": 22, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 6, + "index": 184, + "line": 21, + }, + "start": Object { + "column": 0, + "index": 178, + "line": 21, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 266, + "line": 30, + }, + "start": Object { + "column": 2, + "index": 260, + "line": 30, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 257, + "line": 29, + }, + "start": Object { + "column": 2, + "index": 251, + "line": 29, + }, + }, + "memberof": "D", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "A", + "namespace": "D#A", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "D", + }, + Object { + "kind": "function", + "name": "A", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 248, + "line": 28, + }, + "start": Object { + "column": 2, + "index": 242, + "line": 28, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 239, + "line": 27, + }, + "start": Object { + "column": 2, + "index": 233, + "line": 27, + }, + }, + "memberof": "D", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "a", + "namespace": "D#a", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "D", + }, + Object { + "kind": "function", + "name": "a", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 230, + "line": 26, + }, + "start": Object { + "column": 2, + "index": 224, + "line": 26, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 221, + "line": 25, + }, + "start": Object { + "column": 2, + "index": 215, + "line": 25, + }, + }, + "memberof": "D", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "B", + "namespace": "D#B", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "D", + }, + Object { + "kind": "function", + "name": "B", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 8, + "index": 212, + "line": 24, + }, + "start": Object { + "column": 2, + "index": 206, + "line": 24, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 8, + "index": 203, + "line": 23, + }, + "start": Object { + "column": 2, + "index": 197, + "line": 23, + }, + }, + "memberof": "D", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "b", + "namespace": "D#b", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "D", + }, + Object { + "kind": "function", + "name": "b", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "D", + "namespace": "D", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "D", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 15, + "index": 84, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 69, + "line": 7, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 6, + "index": 68, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 62, + "line": 6, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "a", + "namespace": "a", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "a", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 15, + "index": 60, + "line": 4, + }, + "start": Object { + "column": 0, + "index": 45, + "line": 4, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 6, + "index": 44, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 38, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "b", + "namespace": "b", + "params": Array [], + "path": Array [ + Object { + "kind": "function", + "name": "b", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs sort-order-alpha.input.js markdown 1`] = ` +" + +### Table of Contents + +* [C][1] + * [A][2] + * [a][3] + * [B][4] + * [b][5] +* [D][6] + * [A][7] + * [a][8] + * [B][9] + * [b][10] +* [a][11] +* [b][12] + +## C + +### A + +### a + +### B + +### b + +## D + +### A + +### a + +### B + +### b + +## a + +## b + +[1]: #c + +[2]: #a + +[3]: #a-1 + +[4]: #b + +[5]: #b-1 + +[6]: #d + +[7]: #a-2 + +[8]: #a-3 + +[9]: #b-2 + +[10]: #b-3 + +[11]: #a-4 + +[12]: #b-4 +" +`; + +exports[`outputs sort-order-alpha.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "C", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "a", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "B", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "b", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "D", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "A", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "a", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "B", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "b", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "a", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "b", + }, + ], + "depth": 2, + "type": "heading", + }, + ], + "type": "root", +} +`; + +exports[`outputs string-literal-key.input.js JSON 1`] = ` +Array [ + Object { + "alias": "MyContainerObject", + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 110, + "line": 11, + }, + "start": Object { + "column": 0, + "index": 36, + "line": 4, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "constant", + "loc": Object { + "end": Object { + "column": 3, + "index": 35, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "MyContainerObject", + "namespace": "MyContainerObject", + "params": Array [], + "path": Array [ + Object { + "kind": "constant", + "name": "MyContainerObject", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 1, + "name": "MyContainerObject", + "title": "alias", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 3, + "index": 107, + "line": 10, + }, + "start": Object { + "column": 2, + "index": 86, + "line": 8, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The foo property", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [ + Object { + "commentLineNumber": 0, + "message": "@memberof reference to obj not found", + }, + ], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 5, + "index": 83, + "line": 7, + }, + "start": Object { + "column": 2, + "index": 52, + "line": 5, + }, + }, + "memberof": "obj", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "foo", + "namespace": ".foo", + "params": Array [], + "path": Array [ + Object { + "name": "foo", + "scope": "static", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "static", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs string-literal-key.input.js markdown 1`] = ` +" + +### Table of Contents + +* [MyContainerObject][1] +* [foo][2] + +## MyContainerObject + +## foo + +The foo property + +[1]: #mycontainerobject + +[2]: #foo +" +`; + +exports[`outputs string-literal-key.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "MyContainerObject", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "foo", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The foo property", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs this-class.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 125, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 4, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "module", + "loc": Object { + "end": Object { + "column": 24, + "index": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "bookshelf", + "namespace": "bookshelf", + "params": Array [], + "path": Array [ + Object { + "kind": "module", + "name": "bookshelf", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 0, + "name": "bookshelf", + "title": "module", + "type": null, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 125, + "line": 7, + }, + "start": Object { + "column": 0, + "index": 40, + "line": 4, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 13, + "index": 39, + "line": 3, + }, + "start": Object { + "column": 0, + "index": 26, + "line": 3, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 21, + "index": 122, + "line": 6, + }, + "start": Object { + "column": 2, + "index": 103, + "line": 6, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The title of the book.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 31, + "index": 100, + "line": 5, + }, + "start": Object { + "column": 2, + "index": 71, + "line": 5, + }, + }, + "memberof": "Book", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "title", + "namespace": "Book#title", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "Book", + }, + Object { + "name": "title", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "Book", + "namespace": "Book", + "params": Array [ + Object { + "lineNumber": 4, + "name": "title", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Book", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 0, + "name": null, + "title": "class", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 2, + "index": 237, + "line": 13, + }, + "start": Object { + "column": 0, + "index": 141, + "line": 10, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 13, + "index": 140, + "line": 9, + }, + "start": Object { + "column": 0, + "index": 127, + "line": 9, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 21, + "index": 234, + "line": 12, + }, + "start": Object { + "column": 2, + "index": 215, + "line": 12, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "The title of the bookshelf.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "loc": Object { + "end": Object { + "column": 36, + "index": 212, + "line": 11, + }, + "start": Object { + "column": 2, + "index": 178, + "line": 11, + }, + }, + "memberof": "BookShelf", + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "title", + "namespace": "BookShelf#title", + "params": Array [], + "path": Array [ + Object { + "kind": "class", + "name": "BookShelf", + }, + Object { + "name": "title", + "scope": "instance", + }, + ], + "properties": Array [], + "returns": Array [], + "scope": "instance", + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, + ], + "static": Array [], + }, + "name": "BookShelf", + "namespace": "BookShelf", + "params": Array [ + Object { + "lineNumber": 10, + "name": "title", + "title": "param", + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "BookShelf", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 0, + "name": null, + "title": "class", + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs this-class.input.js markdown 1`] = ` +" + +### Table of Contents + +* [bookshelf][1] +* [Book][2] + * [Parameters][3] + * [title][4] +* [BookShelf][5] + * [Parameters][6] + * [title][7] + +## bookshelf + +## Book + +### Parameters + +* \`title\` + +### title + +The title of the book. + +## BookShelf + +### Parameters + +* \`title\` + +### title + +The title of the bookshelf. + +[1]: #bookshelf + +[2]: #book + +[3]: #parameters + +[4]: #title + +[5]: #bookshelf-1 + +[6]: #parameters-1 + +[7]: #title-1 +" +`; + +exports[`outputs this-class.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "bookshelf", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Book", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "title", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "title", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The title of the book.", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "BookShelf", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "title", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "title", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "The title of the bookshelf.", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", +} +`; + +exports[`outputs type_application.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 0, + "index": 116, + "line": 6, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + }, + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Represents an IPv6 address", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "class", + "loc": Object { + "end": Object { + "column": 3, + "index": 115, + "line": 5, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "Address6", + "namespace": "Address6", + "params": Array [ + Object { + "description": Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "An IPv6 address string", + }, + ], + "type": "paragraph", + }, + ], + "type": "root", + }, + "lineNumber": 3, + "name": "address", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "string", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + ], + "path": Array [ + Object { + "kind": "class", + "name": "Address6", + }, + ], + "properties": Array [], + "returns": Array [], + "sees": Array [], + "tags": Array [ + Object { + "description": null, + "lineNumber": 2, + "name": "Address6", + "title": "class", + "type": null, + }, + Object { + "description": "An IPv6 address string", + "lineNumber": 3, + "name": "address", + "title": "param", + "type": Object { + "applications": Array [ + Object { + "name": "string", + "type": "NameExpression", + }, + ], + "expression": Object { + "name": "Array", + "type": "NameExpression", + }, + "type": "TypeApplication", + }, + }, + ], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs type_application.input.js markdown 1`] = ` +" + +### Table of Contents + +* [Address6][1] + * [Parameters][2] + +## Address6 + +Represents an IPv6 address + +### Parameters + +* \`address\` **[Array][3]<[string][4]>** An IPv6 address string + +[1]: #address6 + +[2]: #parameters + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array + +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +" +`; + +exports[`outputs type_application.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Address6", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Represents an IPv6 address", + }, + ], + "type": "paragraph", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "address", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "Array", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": "<", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "string", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + Object { + "type": "text", + "value": ">", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "An IPv6 address string", + }, + ], + "type": "paragraph", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + }, + ], + "type": "root", +} +`; + +exports[`outputs var-function-param-return.input.js JSON 1`] = ` +Array [ + Object { + "augments": Array [], + "context": Object { + "loc": Object { + "end": Object { + "column": 40, + "index": 47, + "line": 2, + }, + "start": Object { + "column": 0, + "index": 7, + "line": 2, + }, + }, + }, + "description": "", + "errors": Array [], + "examples": Array [], + "implements": Array [], + "kind": "function", + "loc": Object { + "end": Object { + "column": 6, + "index": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "index": 0, + "line": 1, + }, + }, + "members": Object { + "events": Array [], + "global": Array [], + "inner": Array [], + "instance": Array [], + "static": Array [], + }, + "name": "f", + "namespace": "f", + "params": Array [ + Object { + "lineNumber": 2, + "name": "x", + "title": "param", + "type": Object { + "name": "number", + "type": "NameExpression", + }, + }, + ], + "path": Array [ + Object { + "kind": "function", + "name": "f", + }, + ], + "properties": Array [], + "returns": Array [ + Object { + "title": "returns", + "type": Object { + "name": "boolean", + "type": "NameExpression", + }, + }, + ], + "sees": Array [], + "tags": Array [], + "throws": Array [], + "todos": Array [], + "yields": Array [], + }, +] +`; + +exports[`outputs var-function-param-return.input.js markdown 1`] = ` +" + +### Table of Contents + +* [f][1] + * [Parameters][2] + +## f + +### Parameters + +* \`x\` **[number][3]** + +Returns **[boolean][4]** + +[1]: #f + +[2]: #parameters + +[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean +" +`; + +exports[`outputs var-function-param-return.input.js markdown AST 1`] = ` +Object { + "children": Array [ + Object { + "type": "html", + "value": "", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "f", + }, + ], + "depth": 2, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Parameters", + }, + ], + "depth": 3, + "type": "heading", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "inlineCode", + "value": "x", + }, + Object { + "type": "text", + "value": " ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "number", + }, + ], + "identifier": "1", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + ], + "type": "listItem", + }, + ], + "ordered": false, + "spread": false, + "type": "list", + }, + Object { + "children": Array [ + Object { + "type": "text", + "value": "Returns ", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "type": "text", + "value": "boolean", + }, + ], + "identifier": "2", + "referenceType": "full", + "type": "linkReference", + }, + ], + "type": "strong", + }, + Object { + "type": "text", + "value": " ", + }, + ], + "type": "paragraph", + }, + Object { + "identifier": "1", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + }, + Object { + "identifier": "2", + "title": "", + "type": "definition", + "url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + }, + ], + "type": "root", +} +`; diff --git a/__tests__/bin-readme.js b/__tests__/bin-readme.js new file mode 100644 index 000000000..b38ec05dc --- /dev/null +++ b/__tests__/bin-readme.js @@ -0,0 +1,151 @@ +import path from 'path'; +import { exec } from 'child_process'; +import tmp from 'tmp'; +import fs from 'fs-extra'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +function documentation(args, options, parseJSON) { + return new Promise((resolve, reject) => { + if (!options.cwd) { + options.cwd = __dirname; + } + + options.maxBuffer = 1024 * 1024; + + args.unshift( + 'node ' + path.join(__dirname, '..', 'bin', 'documentation.js') + ); + + exec(args.join(' '), options, (err, res) => { + resolve(res); + }); + }); +} + +describe('readme autodetection of different filenames', function () { + const fixtures = path.join(__dirname, 'fixture/readme'); + const sourceFile = path.join(fixtures, 'index.js'); + let d; + let removeCallback; + + beforeEach(() => { + const dirEntry = tmp.dirSync({ unsafeCleanup: true }); + d = dirEntry.name; + fs.copySync( + path.join(fixtures, 'README.input.md'), + path.join(d, 'readme.markdown') + ); + fs.copySync(path.join(fixtures, 'index.js'), path.join(d, 'index.js')); + }); + + test('updates readme.markdown', async function () { + await documentation(['readme index.js -s API'], { cwd: d }); + const outputPath = path.join(d, 'readme.markdown'); + expect(fs.readFileSync(outputPath, 'utf-8')).toMatchSnapshot(); + }); +}); + +describe('readme command', function () { + const fixtures = path.join(__dirname, 'fixture/readme'); + const sourceFile = path.join(fixtures, 'index.js'); + let d; + let removeCallback; + + beforeEach(() => { + const dirEntry = tmp.dirSync({ unsafeCleanup: true }); + d = dirEntry.name; + fs.copySync( + path.join(fixtures, 'README.input.md'), + path.join(d, 'README.md') + ); + fs.copySync(path.join(fixtures, 'index.js'), path.join(d, 'index.js')); + }); + + // run tests after setting up temp dir + + test('--diff-only: changes needed', async function () { + const before = fs.readFileSync(path.join(d, 'README.md'), 'utf-8'); + try { + await documentation(['readme index.js --diff-only -s API'], { + cwd: d + }); + } catch (err) { + const after = fs.readFileSync(path.join(d, 'README.md'), 'utf-8'); + expect(err).toBeTruthy(); + expect(err.code).not.toBe(0); + expect(after).toEqual(before); + } + }); + + test('updates README.md', async function () { + await documentation(['readme index.js -s API'], { cwd: d }); + const outputPath = path.join(d, 'README.md'); + expect(fs.readFileSync(outputPath, 'utf-8')).toMatchSnapshot(); + }); + + test('--readme-file', async function () { + fs.copySync( + path.join(fixtures, 'README.input.md'), + path.join(d, 'other.md') + ); + await documentation(['readme index.js -s API --readme-file other.md'], { + cwd: d + }); + const actual = fs.readFileSync(path.join(d, 'other.md'), 'utf8'); + expect(actual).toMatchSnapshot(); + }); + + test('--diff-only: changes NOT needed', function () { + fs.copySync( + path.join(fixtures, 'README.output.md'), + path.join(d, 'uptodate.md') + ); + return documentation( + ['readme index.js --diff-only -s API --readme-file uptodate.md'], + { cwd: d } + ).then(stdout => { + // t.match(stdout, 'is up to date.'); + }); + }); + + test('-s: not found', async function () { + fs.copySync( + path.join(fixtures, 'README.output.md'), + path.join(d, 'uptodate.md') + ); + try { + await documentation( + ['readme index.js --diff-only -s NOTFOUND --readme-file uptodate.md'], + { cwd: d } + ); + } catch (err) { + expect(err).toBeTruthy(); + } + }); + + test('requires -s option', async function () { + try { + await documentation(['readme index.js'], { cwd: d }); + } catch (err) { + expect(err).toBeTruthy(); + expect(err.code !== 0).toBeTruthy(); + expect(err.stderr.match(/Missing required argument/)).toBeTruthy(); + } + }); + + const badFixturePath = path.join(__dirname, 'fixture/bad/syntax.input'); + test('errors on invalid syntax', async function () { + try { + await documentation( + ['readme ' + badFixturePath + ' -s API --parseExtension input'], + { cwd: d } + ); + } catch (err) { + expect(err).toBeTruthy(); + expect(err.code !== 0).toBeTruthy(); + } + }); +}); diff --git a/__tests__/bin.js b/__tests__/bin.js new file mode 100644 index 000000000..088d8755e --- /dev/null +++ b/__tests__/bin.js @@ -0,0 +1,419 @@ +/* global jasmine */ + +import path from 'path'; +import os from 'os'; +import { exec } from 'child_process'; +import tmp from 'tmp'; +import fs from 'fs-extra'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +function documentation(args, options, parseJSON) { + if (!options) { + options = {}; + } + if (!options.cwd) { + options.cwd = __dirname; + } + + options.maxBuffer = 1024 * 1024; + + args.unshift('node ' + path.join(__dirname, '..', 'bin', 'documentation.js')); + + return new Promise((resolve, reject) => { + exec(args.join(' '), options, function (err, stdout, stderr) { + if (err) { + err.stderr = stderr; + return reject(err); + } + if (parseJSON === false) { + resolve(stdout); + } else { + try { + resolve(JSON.parse(stdout)); + } catch (e) { + reject(e); + } + } + }); + }); +} + +function normalize(result) { + result.forEach(function (item) { + item.context.file = '[path]'; + }); + return result; +} + +test('documentation binary', async function () { + const data = await documentation(['build fixture/simple.input.js'], {}); + expect(data.length).toBe(1); +}); + +test.skip('defaults to parsing package.json main', async function () { + const data = await documentation(['build'], { + cwd: path.join(__dirname, '..') + }); + expect(data.length).toBeTruthy(); +}); + +test('accepts config file', async function () { + const data = await documentation([ + 'build fixture/sorting/input.js -c fixture/config.json' + ]); + expect(normalize(data)).toMatchSnapshot(); +}); + +test('accepts config file - reports failures', async function () { + try { + await documentation( + ['build fixture/sorting/input.js -c fixture/config-bad.yml'], + {}, + false + ); + } catch (stderr) { + expect(stderr).toMatchSnapshot(); + } +}); + +test('accepts config file - reports parse failures', async function () { + try { + await documentation( + ['build fixture/sorting/input.js -c fixture/config-malformed.json'], + {}, + false + ); + } catch (stderr) { + expect(stderr.stderr.match(/SyntaxError/g)).toBeTruthy(); + } +}); + +test('--shallow option', async function () { + const data = await documentation([ + 'build --shallow fixture/internal.input.js' + ]); + expect(data.length).toBe(0); +}); + +test('when a file is specified both in a glob and explicitly, it is only documented once', async function () { + const data = await documentation([ + 'build fixture/simple.input.js fixture/simple.input.*' + ]); + expect(data.length).toBe(1); +}); + +test('extension option', async function () { + const data = await documentation([ + 'build fixture/extension/index.otherextension ' + + '--requireExtension=otherextension --parseExtension=otherextension' + ]); + expect(data.length).toBe(1); +}); + +test('extension option', function () { + return documentation(['build fixture/extension.jsx']); +}); + +describe('invalid arguments', function () { + test('bad -f option', async function () { + try { + await documentation( + ['build -f DOES-NOT-EXIST fixture/internal.input.js'], + {}, + false + ); + } catch (err) { + expect(err).toBeTruthy(); + } + }); + + test('html with no destination', async function () { + try { + await documentation(['build -f html fixture/internal.input.js']); + } catch (err) { + expect( + err + .toString() + .match( + /The HTML output mode requires a destination directory set with -o/ + ) + ).toBeTruthy(); + } + }); + + test('bad command', async function () { + try { + await documentation(['-f html fixture/internal.input.js'], {}, false); + } catch (err) { + expect(err.code).toBeTruthy(); + } + }); +}); + +const semver = + /\bv?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z-]+(?:\.[\da-z-]+)*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?\b/gi; +test('--config', async function () { + const dst = path.join(os.tmpdir(), (Date.now() + Math.random()).toString()); + fs.mkdirSync(dst); + const outputIndex = path.join(dst, 'index.html'); + const data = await documentation( + [ + 'build -c fixture/html/documentation.yml -f html fixture/html/nested.input.js -o ' + + dst + ], + {}, + false + ); + let output = fs.readFileSync(outputIndex, 'utf8'); + const version = (await import('../package.json')).default.version; + output = output.replace(new RegExp(version.replace(/\./g, '\\.'), 'g'), ''); + expect(output).toMatchSnapshot(); +}); + +test('--version', async function () { + const output = await documentation(['--version'], {}, false); + expect(output).toBeTruthy(); +}); + +describe('lint command', function () { + test('generates lint output', async function () { + try { + await documentation(['lint fixture/lint/lint.input.js'], {}, false); + } catch (err) { + const data = err.stderr.toString().split('\n').slice(2).join('\n'); + expect(data).toMatchSnapshot(); + } + }); + + test('generates no output on a good file', async function () { + const data = await documentation( + ['lint fixture/simple.input.js'], + {}, + false + ); + expect(data).toBe(''); + }); + + test('exposes syntax error on a bad file', async function () { + try { + await documentation( + ['lint fixture/bad/syntax.input', '--parseExtension input'], + {}, + false + ); + } catch (err) { + expect(err.code > 0).toBeTruthy(); + } + }); + + test('lint with no inputs', async function () { + try { + await documentation( + ['lint'], + { + cwd: path.join(__dirname, 'fixture/bad') + }, + false + ); + } catch (err) { + expect(err.code > 0).toBeTruthy(); + } + }); + + test('generates lint output with shallow', async function () { + const data = await documentation( + ['lint fixture/lint/lint.input.shallow.js --shallow'], + {}, + false + ); + expect(data).toBe(''); + }); +}); + +test('given no files', async function () { + try { + await documentation(['build']); + } catch (err) { + expect( + err + .toString() + .match( + /documentation was given no files and was not run in a module directory/ + ) + ).toBeTruthy(); + } +}); + +test('with an invalid command', async function () { + try { + await documentation(['invalid'], {}, false); + } catch (err) { + expect(err).toBeTruthy(); + } +}); + +test.skip('--access flag', async function () { + const data = await documentation( + ['build --shallow fixture/internal.input.js -a public'], + {}, + false + ); + expect(data).toBe('[]'); +}); + +test.skip('--infer-private flag', async function () { + const data = await documentation( + ['build fixture/infer-private.input.js --infer-private ^_'], + {}, + false + ); + // This uses JSON.parse with a reviver used as a visitor. + JSON.parse(data, function (n, v) { + // Make sure we do not see any names that match `^_`. + if (n === 'name') { + expect(typeof v).toBe('string'); + expect(!/_$/.test.skip(v)).toBeTruthy(); + } + return v; + }); +}); + +test.skip('write to file', async function () { + const dst = path.join(os.tmpdir(), (Date.now() + Math.random()).toString()); + + const data = await documentation( + ['build --shallow fixture/internal.input.js -o ' + dst], + {}, + false + ); + expect(data).toBe(''); + expect(fs.existsSync(dst)).toBeTruthy(); +}); + +test.skip('write to html', async function () { + const dstDir = path.join( + os.tmpdir(), + (Date.now() + Math.random()).toString() + ); + fs.mkdirSync(dstDir); + + const data = await documentation( + ['build --shallow fixture/internal.input.js -f html -o ' + dstDir], + {}, + false + ); + expect(data).toBe(''); + expect(fs.existsSync(path.join(dstDir, 'index.html'))).toBeTruthy(); +}); + +test.skip('write to html with custom theme', async function () { + const dstDir = path.join( + os.tmpdir(), + (Date.now() + Math.random()).toString() + ); + fs.mkdirSync(dstDir); + + const data = await documentation( + [ + 'build -t fixture/custom_theme --shallow fixture/internal.input.js -f html -o ' + + dstDir + ], + {}, + false + ); + expect(data).toBe(''); + expect(fs.readFileSync(path.join(dstDir, 'index.html'), 'utf8')).toBeTruthy(); +}); + +test.skip('write to html, highlightAuto', function () { + const fixture = 'fixture/auto_lang_hljs/multilanguage.input.js'; + const config = 'fixture/auto_lang_hljs/config.yml'; + const dstDir = path.join( + os.tmpdir(), + (Date.now() + Math.random()).toString() + ); + + fs.mkdirSync(dstDir); + + return documentation( + ['build --shallow ' + fixture + ' -c ' + config + ' -f html -o ' + dstDir], + {}, + false + ).then(() => { + const result = fs.readFileSync(path.join(dstDir, 'index.html'), 'utf8'); + expect( + result.indexOf('42') > 0 + ).toBeTruthy(); + expect( + result.indexOf('[data-foo]') > 0 + ).toBeTruthy(); + expect( + result.indexOf('data-foo') > 0 + ).toBeTruthy(); + }); +}); + +test.skip('fatal error', async function () { + try { + await documentation( + ['build --shallow fixture/bad/syntax.input --parseExtension input'], + {}, + false + ); + } catch (err) { + expect(err.toString().match(/Unexpected token/)).toBeTruthy(); + } +}); + +test('build GFM (e.g. markdown tables) for -f md', async function () { + const data = await documentation( + ['build', 'fixture/html/nested.input.js', '--shallow', '-f', 'md'], + {}, + false + ); + expect(data).toMatchSnapshot(); + expect(data).toMatch( + `| Col 1 | Col 2 | Col 3 | +| ----- | ----- | ----- | +| Dat 1 | Dat 2 | Dat 3 | +| Dat 4 | Dat 5 | Dat 6 |` + ); +}); + +test.skip('build --document-exported', async function () { + const data = await documentation( + ['build fixture/document-exported.input.js --document-exported -f md'], + {}, + false + ); + expect(data).toMatchSnapshot(); +}); + +test.skip('build large file without error (no deoptimized styling error)', function () { + const dstFile = + path.join(os.tmpdir(), (Date.now() + Math.random()).toString()) + '.js'; + let contents = ''; + for (let i = 0; i < 4e4; i++) { + contents += '/* - */\n'; + } + fs.writeFileSync(dstFile, contents, 'utf8'); + + return documentation(['build ' + dstFile], {}, false).then(() => { + fs.unlinkSync(dstFile); + }); +}); + +test.skip('should use browser resolve', async function () { + const data = await documentation(['build fixture/resolve/index.js']); + expect(normalize(data)).toMatchSnapshot(); +}); + +test.skip('should use node resolve', async function () { + const data = await documentation([ + 'build fixture/resolve/index.js --resolve node' + ]); + expect(normalize(data)).toMatchSnapshot(); +}); diff --git a/test/config_fixture/config b/__tests__/config_fixture/config similarity index 100% rename from test/config_fixture/config rename to __tests__/config_fixture/config diff --git a/test/config_fixture/config.json b/__tests__/config_fixture/config.json similarity index 100% rename from test/config_fixture/config.json rename to __tests__/config_fixture/config.json diff --git a/test/config_fixture/config.yaml b/__tests__/config_fixture/config.yaml similarity index 100% rename from test/config_fixture/config.yaml rename to __tests__/config_fixture/config.yaml diff --git a/test/config_fixture/config.yml b/__tests__/config_fixture/config.yml similarity index 100% rename from test/config_fixture/config.yml rename to __tests__/config_fixture/config.yml diff --git a/test/config_fixture/config_comments.json b/__tests__/config_fixture/config_comments.json similarity index 100% rename from test/config_fixture/config_comments.json rename to __tests__/config_fixture/config_comments.json diff --git a/test/config_fixture/config_file.yml b/__tests__/config_fixture/config_file.yml similarity index 100% rename from test/config_fixture/config_file.yml rename to __tests__/config_fixture/config_file.yml diff --git a/test/config_fixture/config_links.yml b/__tests__/config_fixture/config_links.yml similarity index 100% rename from test/config_fixture/config_links.yml rename to __tests__/config_fixture/config_links.yml diff --git a/test/fixture/_external-deps-included.json b/__tests__/fixture/_external-deps-included.json similarity index 93% rename from test/fixture/_external-deps-included.json rename to __tests__/fixture/_external-deps-included.json index 779e67335..33c6f92e3 100644 --- a/test/fixture/_external-deps-included.json +++ b/__tests__/fixture/_external-deps-included.json @@ -109,11 +109,22 @@ } } }, + "augments": [], "errors": [], + "examples": [], + "params": [], + "properties": [], + "returns": [], + "sees": [], + "throws": [], + "todos": [], "name": "foo", "kind": "function", "members": { + "global": [], + "inner": [], "instance": [], + "events": [], "static": [] }, "path": [ @@ -210,7 +221,11 @@ } } }, + "augments": [], "errors": [], + "examples": [], + "params": [], + "properties": [], "returns": [ { "description": { @@ -265,16 +280,23 @@ } } }, + "title": "returns", "type": { "type": "NameExpression", "name": "Number" } } ], + "sees": [], + "throws": [], + "todos": [], "name": "main", "kind": "function", "members": { + "global": [], + "inner": [], "instance": [], + "events": [], "static": [] }, "path": [ @@ -371,7 +393,11 @@ } } }, + "augments": [], "errors": [], + "examples": [], + "params": [], + "properties": [], "returns": [ { "description": { @@ -426,16 +452,23 @@ } } }, + "title": "returns", "type": { "type": "NameExpression", "name": "Number" } } ], + "sees": [], + "throws": [], + "todos": [], "name": "index", "kind": "function", "members": { + "global": [], + "inner": [], "instance": [], + "events": [], "static": [] }, "path": [ diff --git a/test/fixture/_multi-file-input.json b/__tests__/fixture/_multi-file-input.json similarity index 95% rename from test/fixture/_multi-file-input.json rename to __tests__/fixture/_multi-file-input.json index 854a11638..11a72d624 100644 --- a/test/fixture/_multi-file-input.json +++ b/__tests__/fixture/_multi-file-input.json @@ -100,9 +100,16 @@ } } }, + "augments": [], "errors": [], + "examples": [ + { + "description": "var result = returnTwo(4);\n// result is 6" + } + ], "params": [ { + "title": "param", "name": "a", "lineNumber": 3, "description": { @@ -163,6 +170,7 @@ } } ], + "properties": [], "returns": [ { "description": { @@ -217,21 +225,23 @@ } } }, + "title": "returns", "type": { "type": "NameExpression", "name": "Number" } } ], - "examples": [ - { - "description": "var result = returnTwo(4);\n// result is 6" - } - ], + "sees": [], + "throws": [], + "todos": [], "name": "returnTwo", "kind": "function", "members": { + "global": [], + "inner": [], "instance": [], + "events": [], "static": [] }, "path": [ @@ -328,7 +338,11 @@ } } }, + "augments": [], "errors": [], + "examples": [], + "params": [], + "properties": [], "returns": [ { "description": { @@ -383,16 +397,23 @@ } } }, + "title": "returns", "type": { "type": "NameExpression", "name": "number" } } ], + "sees": [], + "throws": [], + "todos": [], "name": "simple.input", "kind": "function", "members": { + "global": [], + "inner": [], "instance": [], + "events": [], "static": [] }, "path": [ diff --git a/test/fixture/auto_lang_hljs/config.yml b/__tests__/fixture/auto_lang_hljs/config.yml similarity index 100% rename from test/fixture/auto_lang_hljs/config.yml rename to __tests__/fixture/auto_lang_hljs/config.yml diff --git a/test/fixture/auto_lang_hljs/multilanguage.input.js b/__tests__/fixture/auto_lang_hljs/multilanguage.input.js similarity index 82% rename from test/fixture/auto_lang_hljs/multilanguage.input.js rename to __tests__/fixture/auto_lang_hljs/multilanguage.input.js index 8b8eb0687..a14bb7835 100644 --- a/test/fixture/auto_lang_hljs/multilanguage.input.js +++ b/__tests__/fixture/auto_lang_hljs/multilanguage.input.js @@ -5,7 +5,7 @@ * var myFoo = new Foo('[data-foo]'); * myFoo.foo(42); * @example - *

Data-Foo Element in the dom

+ *

Data-Foo Element in the dom

* @example * [data-foo] { * background-color: red; @@ -15,7 +15,7 @@ * @augments Foo * @augments Bar */ -module.exports = function () { +module.exports = function() { // this returns 1 return 1; }; diff --git a/test/fixture/auto_lang_hljs/multilanguage.output.md b/__tests__/fixture/auto_lang_hljs/multilanguage.output.md similarity index 97% rename from test/fixture/auto_lang_hljs/multilanguage.output.md rename to __tests__/fixture/auto_lang_hljs/multilanguage.output.md index 45c2dd157..e648388cc 100644 --- a/test/fixture/auto_lang_hljs/multilanguage.output.md +++ b/__tests__/fixture/auto_lang_hljs/multilanguage.output.md @@ -1,6 +1,6 @@ -# multilanguage.input +## multilanguage.input **Extends Foo, Bar** diff --git a/test/fixture/bad/syntax.input.js b/__tests__/fixture/bad/syntax.input similarity index 100% rename from test/fixture/bad/syntax.input.js rename to __tests__/fixture/bad/syntax.input diff --git a/test/fixture/bad/syntax.output.json b/__tests__/fixture/bad/syntax.output.json similarity index 65% rename from test/fixture/bad/syntax.output.json rename to __tests__/fixture/bad/syntax.output.json index ba4eca87f..2572df4da 100644 --- a/test/fixture/bad/syntax.output.json +++ b/__tests__/fixture/bad/syntax.output.json @@ -1,7 +1,7 @@ { - "pos": 0, + "pos": 19, "loc": { - "line": 1, + "line": 2, "column": 0 }, "_babel": true diff --git a/test/fixture/boolean-literal-type.input.js b/__tests__/fixture/boolean-literal-type.input.js similarity index 100% rename from test/fixture/boolean-literal-type.input.js rename to __tests__/fixture/boolean-literal-type.input.js diff --git a/test/fixture/class.input.js b/__tests__/fixture/class.input.js similarity index 75% rename from test/fixture/class.input.js rename to __tests__/fixture/class.input.js index aa3db4283..15fed4af0 100644 --- a/test/fixture/class.input.js +++ b/__tests__/fixture/class.input.js @@ -1,6 +1,7 @@ /** * This is my class, a demo thing. * @class MyClass + * @implements {MyInterface} * @property {number} howMany how many things it contains */ function MyClass() { @@ -12,7 +13,7 @@ function MyClass() { * @param {boolean} getIt whether to get the number * @returns {number} forty-two */ -MyClass.prototype.getFoo = function (getIt) { +MyClass.prototype.getFoo = function(getIt) { return getIt ? 42 : 0; }; @@ -20,4 +21,4 @@ MyClass.prototype.getFoo = function (getIt) { * Get undefined * @returns {undefined} does not return anything. */ -MyClass.prototype.getUndefined = function () { }; +MyClass.prototype.getUndefined = function() {}; diff --git a/test/fixture/config-bad.yml b/__tests__/fixture/config-bad.yml similarity index 100% rename from test/fixture/config-bad.yml rename to __tests__/fixture/config-bad.yml diff --git a/__tests__/fixture/config-malformed.json b/__tests__/fixture/config-malformed.json new file mode 100644 index 000000000..72e8ffc0d --- /dev/null +++ b/__tests__/fixture/config-malformed.json @@ -0,0 +1 @@ +* diff --git a/test/fixture/config.json b/__tests__/fixture/config.json similarity index 100% rename from test/fixture/config.json rename to __tests__/fixture/config.json diff --git a/test/fixture/custom_theme/index.js b/__tests__/fixture/custom_theme/index.js similarity index 55% rename from test/fixture/custom_theme/index.js rename to __tests__/fixture/custom_theme/index.js index db1e3a385..5bd09e836 100644 --- a/test/fixture/custom_theme/index.js +++ b/__tests__/fixture/custom_theme/index.js @@ -5,9 +5,11 @@ var File = require('vinyl'); * support. */ module.exports = function(comments, options, callback) { - return callback(null, [new File({ - base: '/', - path: '/index.html', - contents: new Buffer('Hello world') - })]); + return Promise.resolve([ + new File({ + base: '/', + path: '/index.html', + contents: Buffer.from('Hello world') + }) + ]); }; diff --git a/__tests__/fixture/default-export-function.input.js b/__tests__/fixture/default-export-function.input.js new file mode 100644 index 000000000..17dd436c2 --- /dev/null +++ b/__tests__/fixture/default-export-function.input.js @@ -0,0 +1,5 @@ +/** i am foo */ +export default function() { + /** i am foo's son */ + this.bar = () => {}; +} diff --git a/__tests__/fixture/document-exported-bad/exports-z.js b/__tests__/fixture/document-exported-bad/exports-z.js new file mode 100644 index 000000000..fd191d77f --- /dev/null +++ b/__tests__/fixture/document-exported-bad/exports-z.js @@ -0,0 +1 @@ +export var z = 1; diff --git a/__tests__/fixture/document-exported-bad/x.js b/__tests__/fixture/document-exported-bad/x.js new file mode 100644 index 000000000..10ed3fe3d --- /dev/null +++ b/__tests__/fixture/document-exported-bad/x.js @@ -0,0 +1 @@ +export { y as x } from './exports-z.js'; diff --git a/__tests__/fixture/document-exported-export-default-object.input.js b/__tests__/fixture/document-exported-export-default-object.input.js new file mode 100644 index 000000000..00210d2c4 --- /dev/null +++ b/__tests__/fixture/document-exported-export-default-object.input.js @@ -0,0 +1,5 @@ +// Options: {"documentExported": true} + +export default { + x: 42 +}; diff --git a/__tests__/fixture/document-exported-export-default-value.input.js b/__tests__/fixture/document-exported-export-default-value.input.js new file mode 100644 index 000000000..d9c98e434 --- /dev/null +++ b/__tests__/fixture/document-exported-export-default-value.input.js @@ -0,0 +1,3 @@ +// Options: {"documentExported": true} + +export default 42; diff --git a/test/fixture/document-exported.input.js b/__tests__/fixture/document-exported.input.js similarity index 72% rename from test/fixture/document-exported.input.js rename to __tests__/fixture/document-exported.input.js index 0f4cffa5d..3c2c1e0dc 100644 --- a/test/fixture/document-exported.input.js +++ b/__tests__/fixture/document-exported.input.js @@ -1,6 +1,7 @@ // Options: {"documentExported": true} export class Class { + constructor(a: string) {} classMethod() {} get classGetter() {} set classSetter(v) {} @@ -9,12 +10,12 @@ export class Class { static set staticSetter(v) {} } -export var object = { +export var object = { method() {}, get getter() {}, set setter(v) {}, prop: 42, - func: function() {}, + func: function() {} }; /** Should not document this */ @@ -34,7 +35,7 @@ class NotExportedClass { } /** Should not document this */ -var notExportedObject = { +var notExportedObject = { /** Should not document this */ method() {}, /** Should not document this */ @@ -44,38 +45,37 @@ var notExportedObject = { /** Should not document this */ prop: 42, /** Should not document this */ - func: function() {}, + func: function() {} }; -export {x, y3 as y4} from './document-exported/x'; -export z from './document-exported/z.js'; -export y2Default from './document-exported/y.js'; +export { x, y3 as y4 } from './document-exported/x'; +export z from './document-exported/z.js'; +export y2Default from './document-exported/y.js'; function f1() {} function f2() {} -export {f1, f2 as f3}; +export { f1, f2 as f3 }; export type T = number; type T2 = string; type T3 = string; -export type {T2, T3 as T4}; +export type { T2, T3 as T4 }; -export type {T5} from './document-exported/x.js'; +export type { T5 } from './document-exported/x.js'; -export var f4 = function(x: X) {} +export var f4 = function(x: X) {}; - -export {f5}; +export { f5 }; export var o1 = { om1() {} -} +}; /** f5 comment */ var f5 = function(y: Y) {}, o2 = { om2() {} }; -export {o2}; +export { o2 }; diff --git a/__tests__/fixture/document-exported/x.js b/__tests__/fixture/document-exported/x.js new file mode 100644 index 000000000..7a1b56a7c --- /dev/null +++ b/__tests__/fixture/document-exported/x.js @@ -0,0 +1,3 @@ +export { y as x, y3 } from './y.js'; + +export type T5 = boolean; diff --git a/test/fixture/document-exported/y.js b/__tests__/fixture/document-exported/y.js similarity index 89% rename from test/fixture/document-exported/y.js rename to __tests__/fixture/document-exported/y.js index 822b2fab0..0209640ad 100644 --- a/test/fixture/document-exported/y.js +++ b/__tests__/fixture/document-exported/y.js @@ -7,4 +7,4 @@ export default y2; /** Description of y3 */ function y3(p: number): void {} -export {y3}; +export { y3 }; diff --git a/test/fixture/document-exported/z.js b/__tests__/fixture/document-exported/z.js similarity index 100% rename from test/fixture/document-exported/z.js rename to __tests__/fixture/document-exported/z.js diff --git a/__tests__/fixture/es6-class-property.input.js b/__tests__/fixture/es6-class-property.input.js new file mode 100644 index 000000000..ee201c725 --- /dev/null +++ b/__tests__/fixture/es6-class-property.input.js @@ -0,0 +1,25 @@ +/** + * This is for issue 906. + */ +export class Issue906 { + /** + * This is a read-write property. + * @type {boolean} + */ + get readWriteProp() { + return this._rw; + } + + set readWriteProp(value) { + this._rw = value; + } + + /** + * This is a read-only property. + * @type {string} + * @readonly + */ + get readOnlyProp() { + return 'foo'; + } +} diff --git a/__tests__/fixture/es6-class.input.js b/__tests__/fixture/es6-class.input.js new file mode 100644 index 000000000..e8e57d12a --- /dev/null +++ b/__tests__/fixture/es6-class.input.js @@ -0,0 +1,25 @@ +/** + * This is my component. This is from issue #458 + */ +class Foo extends React.Component {} + +/** + * Does nothing. This is from issue #556 + * @param {string} str + */ +export class Bar { + constructor(str) { + /** + * A useless property + * @type {string} + */ + this.bar = ''; + } +} + +/** + * This class has fully inferred constructor parameters. + */ +export class Baz { + constructor(n: number, l: Array) {} +} diff --git a/__tests__/fixture/es6-default2.input.js b/__tests__/fixture/es6-default2.input.js new file mode 100644 index 000000000..50050cdf2 --- /dev/null +++ b/__tests__/fixture/es6-default2.input.js @@ -0,0 +1,4 @@ +/** + * @public + */ +export default thisIsTheArgument => {}; diff --git a/test/fixture/es6-ext.es6 b/__tests__/fixture/es6-ext.es6 similarity index 100% rename from test/fixture/es6-ext.es6 rename to __tests__/fixture/es6-ext.es6 diff --git a/__tests__/fixture/es6-import.input.js b/__tests__/fixture/es6-import.input.js new file mode 100644 index 000000000..84b28789f --- /dev/null +++ b/__tests__/fixture/es6-import.input.js @@ -0,0 +1,16 @@ +import hasEx6 from './es6-ext'; +import multiply from './simple.input.js'; +import * as foo from 'some-other-module'; + +// Disable dynamic imports for now until +// https://github.com/thgreasi/babel-plugin-system-import-transformer +// can be updated to support babel 7. +// import('./simple.input.js').then(() => {}); + +/** + * This function returns the number one. + * @returns {Number} numberone + */ +var multiplyTwice = a => a * multiply(a); + +export default multiplyTwice; diff --git a/test/fixture/es6.input.js b/__tests__/fixture/es6.input.js similarity index 61% rename from test/fixture/es6.input.js rename to __tests__/fixture/es6.input.js index 4f88d9a69..05ac68689 100644 --- a/test/fixture/es6.input.js +++ b/__tests__/fixture/es6.input.js @@ -2,16 +2,18 @@ * This function destructures with defaults. It should not * have any parameter descriptions. */ -function destructure({phoneNumbers = [], emailAddresses = [], ...params} = {}) { -} +function destructure({ + phoneNumbers = [], + emailAddresses = [], + ...params +} = {}) {} /** * Similar, but with an array * @example - * destructure([1, 2, 3]) + * destructure2([0, 1, 2, 3]) */ -function destructure([a, b, c]) { -} +function destructure2([, a, b, c]) {} /** * This function returns the number one. @@ -22,8 +24,21 @@ var multiply = (a, b) => a * b; /** * This is a sink + * @param {number} height the height of the thing + * @param {number} width the width of the thing + * @example + * \@abc + * class A { + * \@bind + * say() {} + * } */ class Sink { + constructor(height, width) { + this.height = height; + this.width = width; + } + /** * This is a property of the sink. */ @@ -36,6 +51,13 @@ class Sink { return 1; } + /** + * This uses the class property transform + */ + classprop = (a: number): string => { + return 'hi'; + }; + /** * This method says hello */ @@ -50,15 +72,6 @@ class Sink { get aGetter() { return 42; } - - /** - * @param {number} height the height of the thing - * @param {number} width the width of the thing - */ - constructor(height, width) { - this.height = height; - this.width = width; - } } /** @@ -66,8 +79,7 @@ class Sink { * * @returns {Basket} a basket */ -function makeABasket() { -} +function makeABasket() {} /** * This method returns a {@link Sink sink}. The type should be linked. @@ -75,19 +87,23 @@ function makeABasket() { * * @returns {Sink} a sink */ -function makeASink() { -} +function makeASink() {} /** * This function takes rest params */ -function functionWithRest(...someParams) { -} +function functionWithRest(...someParams) {} /** * So does this one, with types */ function functionWithRestAndType(...someParams: number) { + /** + * This is an inner member. We are still trying to figure out + * what these are for. + * @inner + */ + var x = 10; } // FUNCTION TYPES @@ -95,7 +111,7 @@ function functionWithRestAndType(...someParams: number) { /** * This is an async method */ -async function foo() { } +async function foo() {} export default multiply; @@ -103,13 +119,13 @@ export default multiply; * This function returns the number one. * @returns {Number} numberone */ -module.exports = () => (

hello

); +module.exports = () =>

hello

; /** * This tests our support of optional parameters in ES6 */ function veryImportantTransform(foo = 'bar') { - return "42"; + return '42'; } // ACCESS LEVELS @@ -118,25 +134,25 @@ function veryImportantTransform(foo = 'bar') { * A private function * @private */ -function iAmPrivate() { } +function iAmPrivate() {} /** * A protected function * @protected */ -function iAmProtected() { } +function iAmProtected() {} /** * A public function * @public */ -function iAmPublic() { } +function iAmPublic() {} /** * A private function using the access tag * @access private */ -function iAmAccessPrivate() { } +function iAmAccessPrivate() {} /** * This is re-exported @@ -151,3 +167,23 @@ export function isArrayEqualWith( ): boolean { return true; } + +/** Regression check for #749 */ +export function paramWithMemberType(a: atype.property): boolean { + return true; +} + +/** babel parser plugins */ +class A { + // classPrivateProperties + #b = 1; + // classPrivateMethods + #c(a, b) { + // numericSeparator + let y = 100_000; + // nullishCoalescingOperator + let x = a ?? b; + // logicalAssignment + return (x &&= b?.b |> String.fromCharCode); + } +} diff --git a/test/fixture/es6.output.md b/__tests__/fixture/es6.output-toc.md similarity index 83% rename from test/fixture/es6.output.md rename to __tests__/fixture/es6.output-toc.md index 815570663..3a8dc9a99 100644 --- a/test/fixture/es6.output.md +++ b/__tests__/fixture/es6.output-toc.md @@ -1,6 +1,6 @@ -# destructure +## destructure This function destructures with defaults. It should not have any parameter descriptions. @@ -12,16 +12,16 @@ have any parameter descriptions. - `$0.emailAddresses` (optional, default `[]`) - `$0.params` **...any** -# destructure +## destructure Similar, but with an array **Parameters** - `$0` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** - - `$0.a` - - `$0.b` - - `$0.c` + - `$0.0` + - `$0.1` + - `$0.2` **Examples** @@ -29,7 +29,7 @@ Similar, but with an array destructure([1, 2, 3]) ``` -# multiply +## multiply This function returns the number one. @@ -40,48 +40,46 @@ This function returns the number one. Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** numberone -# Sink +## Sink This is a sink -## staticProp +**Parameters** + +- `height` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the height of the thing +- `width` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the width of the thing + +### staticProp This is a property of the sink. -## empty +### empty Is it empty -## aGetter +### aGetter This is a getter method: it should be documented as a property. -## constructor - -**Parameters** - -- `height` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the height of the thing -- `width` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the width of the thing - -## hello +### hello This method says hello -# makeABasket +## makeABasket This method returns a basket. The type should not be linked. Returns **Basket** a basket -# makeASink +## makeASink This method returns a [sink](#sink). The type should be linked. It takes a [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) which should also be linked. Returns **[Sink](#sink)** a sink -# functionWithRest +## functionWithRest This function takes rest params @@ -89,7 +87,7 @@ This function takes rest params - `someParams` **...any** -# functionWithRestAndType +## functionWithRestAndType So does this one, with types @@ -97,17 +95,17 @@ So does this one, with types - `someParams` **...[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** -# foo +## foo This is an async method -# es6.input +## es6.input This function returns the number one. Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** numberone -# veryImportantTransform +## veryImportantTransform This tests our support of optional parameters in ES6 @@ -115,19 +113,19 @@ This tests our support of optional parameters in ES6 - `foo` (optional, default `'bar'`) -# iAmProtected +## iAmProtected A protected function -# iAmPublic +## iAmPublic A public function -# execute +## execute This is re-exported -# isArrayEqualWith +## isArrayEqualWith Regression check for #498 @@ -135,6 +133,16 @@ Regression check for #498 - `array1` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<T>** - `array2` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<T>** -- `compareFunction` **function (a: T, b: T): [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** (optional, default `(a: T, b: T): boolean => a === b`) +- `compareFunction` **function (a: T, b: T): [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `(a:T,b:T):boolean=>a===b`) + +Returns **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** + +## paramWithMemberType + +Regression check for #749 + +**Parameters** + +- `a` **atype.property** Returns **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** diff --git a/test/fixture/event.input.js b/__tests__/fixture/event.input.js similarity index 100% rename from test/fixture/event.input.js rename to __tests__/fixture/event.input.js diff --git a/test/fixture/example-caption.input.js b/__tests__/fixture/example-caption.input.js similarity index 100% rename from test/fixture/example-caption.input.js rename to __tests__/fixture/example-caption.input.js diff --git a/test/fixture/extension.jsx b/__tests__/fixture/extension.jsx similarity index 100% rename from test/fixture/extension.jsx rename to __tests__/fixture/extension.jsx diff --git a/test/fixture/extension/extension-required.jsx b/__tests__/fixture/extension/extension-required.jsx similarity index 100% rename from test/fixture/extension/extension-required.jsx rename to __tests__/fixture/extension/extension-required.jsx diff --git a/test/fixture/extension/index.otherextension b/__tests__/fixture/extension/index.otherextension similarity index 100% rename from test/fixture/extension/index.otherextension rename to __tests__/fixture/extension/index.otherextension diff --git a/test/fixture/external.input.js b/__tests__/fixture/external.input.js similarity index 71% rename from test/fixture/external.input.js rename to __tests__/fixture/external.input.js index d156ef676..bfa5dbf15 100644 --- a/test/fixture/external.input.js +++ b/__tests__/fixture/external.input.js @@ -1,14 +1,11 @@ require('external'); require('external2'); require('module-not-found'); -// non-js require -require('./polyglot/blend.cpp'); /** * I am in `external.input.js`. */ function foo() { - 'use strict'; return 'bar'; } diff --git a/test/fixture/factory.input.js b/__tests__/fixture/factory.input.js similarity index 71% rename from test/fixture/factory.input.js rename to __tests__/fixture/factory.input.js index d133d75cf..70d2207dd 100644 --- a/test/fixture/factory.input.js +++ b/__tests__/fixture/factory.input.js @@ -3,19 +3,16 @@ * @returns {area} chart */ var area = function() { - /** * @class area */ - var chart = function(selection) { - }; + var chart = function(selection) {}; /** * Sets the chart data. * @function */ - chart.data = function(_) { - }; + chart.data = function(_) {}; return chart; }; diff --git a/__tests__/fixture/flow-exported-opaque-type.input.js b/__tests__/fixture/flow-exported-opaque-type.input.js new file mode 100644 index 000000000..9bcf2e647 --- /dev/null +++ b/__tests__/fixture/flow-exported-opaque-type.input.js @@ -0,0 +1,4 @@ +// @flow + +/** MyOpaqueType Description Here */ +export opaque type MyOpaqueType: string = string \ No newline at end of file diff --git a/__tests__/fixture/flow-optional-chaining.input.js b/__tests__/fixture/flow-optional-chaining.input.js new file mode 100644 index 000000000..ce93158b2 --- /dev/null +++ b/__tests__/fixture/flow-optional-chaining.input.js @@ -0,0 +1,6 @@ +// @flow + +/** foo */ +const foo: { prop1?: { prop2?: string } } = { prop1: { prop2: 'value' } }; +/** value */ +const value = foo?.prop1?.prop2; diff --git a/__tests__/fixture/flow-unnamed-params.input.js b/__tests__/fixture/flow-unnamed-params.input.js new file mode 100644 index 000000000..f99d777ae --- /dev/null +++ b/__tests__/fixture/flow-unnamed-params.input.js @@ -0,0 +1,16 @@ +// @flow + +/** x */ +let x: T => string; + +/** x2 */ +let x2: (a: T) => string; + +/** T */ +type T = (string[]) => { num: number }; + +/** T2 */ +type T2 = (a: string[]) => { num: number }; + +/** T3 */ +type T3 = (a?: string) => { num: number }; diff --git a/__tests__/fixture/flow/comment-types.js b/__tests__/fixture/flow/comment-types.js new file mode 100644 index 000000000..fd04ae12b --- /dev/null +++ b/__tests__/fixture/flow/comment-types.js @@ -0,0 +1,17 @@ +// @flow + +/*:: +type Foo = { + foo: number, + bar: boolean, + baz: string +}; +*/ + +class MyClass { + /*:: prop: Foo; */ + + method(value /*: Foo */) /*: boolean */ { + return value.bar; + } +} diff --git a/test/fixture/html/documentation.yml b/__tests__/fixture/html/documentation.yml similarity index 100% rename from test/fixture/html/documentation.yml rename to __tests__/fixture/html/documentation.yml diff --git a/test/fixture/html/nested.input.js b/__tests__/fixture/html/nested.input.js similarity index 74% rename from test/fixture/html/nested.input.js rename to __tests__/fixture/html/nested.input.js index dbb8b8c5e..4088ea8fc 100644 --- a/test/fixture/html/nested.input.js +++ b/__tests__/fixture/html/nested.input.js @@ -1,5 +1,3 @@ -'use strict'; - /** * Creates a new Klass * @extends Stream.Writable @@ -15,7 +13,7 @@ function Klass(foo) { * @example this shows you how to getFoo * var x = foo.getFoo(); */ -Klass.prototype.getFoo = function () { +Klass.prototype.getFoo = function() { return this.foo; }; @@ -26,8 +24,16 @@ Klass.prototype.getFoo = function () { * @param {number} options.bar * @param {?number} otherOptions */ -Klass.prototype.withOptions = function (options, otherOptions) { -}; +Klass.prototype.withOptions = function(options, otherOptions) {}; + +/** + * A function with a deep options parameter + * @param {Object} options + * @param {string} options.foo + * @param {Object} options.bar + * @param {string} options.bar.buz + */ +Klass.prototype.withDeepOptions = function(options) {}; /** * @typedef CustomError @@ -47,7 +53,7 @@ Klass.prototype.withOptions = function (options, otherOptions) { * @param {*} also * @returns {boolean} whether the other thing is a Klass */ -Klass.isClass = function (other, also) { +Klass.isClass = function(other, also) { return other instanceof Klass; }; @@ -58,7 +64,7 @@ Klass.isClass = function (other, also) { * @param {Weird} other * @returns {boolean} whether the other thing is a Klass */ -Klass.isWeird = function (other) { +Klass.isWeird = function(other) { return other instanceof Weird; }; @@ -69,7 +75,7 @@ Klass.isWeird = function (other) { * @param {number} [size=0] size * @returns {boolean} whether the other thing is a Klass */ -Klass.isBuffer = function (buf, size) { +Klass.isBuffer = function(buf, size) { return other instanceof Buffer; }; @@ -82,7 +88,7 @@ Klass.isBuffer = function (buf, size) { * var k = new Klass(); * k.isArrayOfBuffers(); */ -Klass.isArrayOfBuffers = function (buffers) { +Klass.isArrayOfBuffers = function(buffers) { return buffers.length; }; @@ -106,7 +112,7 @@ function bar() { * Rest property function * @returns {undefined} nothing */ -function bar(...toys: Number) { +function bar2(...toys: Number) { return undefined; } @@ -117,7 +123,7 @@ function bar(...toys: Number) { * * @returns {undefined} nothing */ -function bar() { +function bar3() { return undefined; } @@ -133,6 +139,17 @@ bar(); * This is Foo */ class Foo { + /** + * This is bar + */ + get bar() {} +} + +/** + * This is Foobar + * must have a distinct id from Foo.bar + */ +class Foobar { /** * This is bar */ @@ -142,13 +159,21 @@ class Foo { /** * I am the container of stream types */ -var customStreams = { }; +var customStreams = {}; /** * I am a passthrough stream that belongs to customStreams * * @kind class */ -customStreams.passthrough = function () { +customStreams.passthrough = function() { this.custom = true; }; + +/** + * | Col 1 | Col 2 | Col 3 | + * |-------|-------|-------| + * | Dat 1 | Dat 2 | Dat 3 | + * | Dat 4 | Dat 5 | Dat 6 | + */ + var tableObj = {}; \ No newline at end of file diff --git a/test/fixture/html/nested.output.files b/__tests__/fixture/html/nested.output.files similarity index 94% rename from test/fixture/html/nested.output.files rename to __tests__/fixture/html/nested.output.files index 9c9e5725a..908fa8ed5 100644 --- a/test/fixture/html/nested.output.files +++ b/__tests__/fixture/html/nested.output.files @@ -2,7 +2,7 @@ - | Documentation + documentation 4.0.0-rc.0 | Documentation @@ -13,8 +13,8 @@
-

-
+

documentation

+
4.0.0-rc.0
-
  • - .event -
  • - @@ -93,6 +87,18 @@ + + +
    @@ -160,6 +166,7 @@ +
    @@ -187,6 +194,7 @@ +
    @@ -218,7 +226,7 @@
    new Klass(foo: any)
    - +

    Extends @@ -233,6 +241,7 @@ +

    Parameters
    @@ -279,7 +288,7 @@ This is a [link to something that does not exist]DoesNotisClass(other: Object, also: any): boolean - + @@ -287,6 +296,7 @@ This is a [link to something that does not exist]DoesNotParameters @@ -354,7 +364,7 @@ the referenced class type

    isWeird(other: Weird): boolean
    - + @@ -362,6 +372,7 @@ the referenced class type

    +
    Parameters
    @@ -408,7 +419,7 @@ the referenced class type

    - isBuffer(buf, size = 0) + isBuffer(buf, size)