-
-
Notifications
You must be signed in to change notification settings - Fork 751
Closed
Milestone
Description
Search terms
type parsing
Expected Behavior
Result type which is an array of maps is correctly parsed
Actual Behavior
Result type which is an array of maps is incorrectly parsed
Steps to reproduce the bug
typedoc.json:
{
"cleanOutputDir": true,
"entryPointStrategy": "expand",
"entryPoints": [
"src"
],
"hideLegend": true,
"out": "_doc",
"readme": "none"
}tsconfig.json:
{
"compilerOptions": {
"allowJs": true,
"module": "commonjs",
"outDir": "tmp",
"target": "esnext"
},
"include": [
"src/**/*.js"
]
}package.json:
{
"dependencies": {
"typedoc": "0.22.14",
"typescript": "4.6.3"
}
}src/file.js
/**
* @returns {[{ [key1: string]: number }, { [key2: string]: string }]}
*/
const fn = () => [{ a: 42 }, { b: '42' }]
module.exports = { fn }Executing
npm i
npx typedocgenerates a file _doc/index.html that includes line:
Returns [{}, {}]
and the following bugged line:
, { [key2: string]: string }]}
Environment
- Typedoc version: conf.
package.json - TypeScript version: conf.
package.json - Node.js version: v14.17.4
- OS: MacOS