Skip to content

Unable to use options.json/tsconfig.json programatically #1162

@Gerrit0

Description

@Gerrit0

Expected Behavior

The following code from the website should work:

const TypeDoc = require('typedoc');

const app = new TypeDoc.Application({
    mode:   'Modules',
    logger: 'none',
    target: 'ES5',
    module: 'CommonJS',
    experimentalDecorators: true
});
app.options.addReader(new TypeDoc.TypeDocReader());
app.options.addReader(new TypeDoc.TSConfigReader());
app.bootstrap();

const project = app.convert(app.expandInputFiles(['src']));

if (project) { // Project may not have converted correctly
    const outputDir = 'docs';

    // Rendered docs
    app.generateDocs(project, outputDir);
    // Alternatively generate JSON output
    app.generateJson(project, outputDir + '/documentation.json');
}

Actual Behavior

Crash - TypeDocReader and TSConfigReader are not exported

Environment

  • Typedoc version: v0.16.0
  • Node.js version: N/A
  • OS: N/A

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