Skip to content

module.exports = [] fails with AssertionError [ERR_ASSERTION]: false == true #2909

Closed
@jacobshirley

Description

@jacobshirley

Search terms

AssertionError [ERR_ASSERTION]: false == true
at Object.convertType (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/types.js:128:9)
at convertType (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/types.js:112:34)
at Converter.convertType (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/converter.js:336:20)
at Object.convertVariable (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/symbols.js:584:45)
at _convertSymbolNow (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/symbols.js:113:41)
at convertSymbol (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/symbols.js:126:5)
at Converter.convertSymbol (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/converter.js:333:13)
at Converter.convertExports (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/converter.js:444:22)
at Converter.compile (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/converter.js:405:22)
at Converter.convert (file:///folder/node_modules/.pnpm/[email protected][email protected]/node_modules/typedoc/dist/lib/converter/converter.js:310:18) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}

Expected Behavior

It should be able to process module.exports = []; as it is valid JavaScript/TypeScript.

Actual Behavior

It throws the above error.

Steps to reproduce the bug

Run typedoc on the following code:

module.exports = []

Environment

  • Typedoc version: 0.28.0
  • TypeScript version: 5.7.3
  • Node.js version: v20.9.0
  • OS: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions