Skip to content

Cannot set output-specific options #2818

@OmarTawfik

Description

@OmarTawfik

The following config allows setting options both globally (for all outputs?), and for each output. But currently it errors out. I tried it with both cleanOutputDir (for the html output), and pretty (for the json output). The options works globally, but fail on output-level with the below errors:

const config = {
  entryPoints: [ "..." ],

  // options work when defined globally:
  cleanOutputDir: true,
  pretty: true,

  outputs: [
    {
      name: "html",
      path: "...",
      options: {
        // [error] Tried to modify an option (cleanOutputDir) value after options have been frozen.
        // cleanOutputDir: true,
      },
    },
    {
      name: "json",
      path: "...",
      options: {
        // [error] Tried to modify an option (pretty) value after options have been frozen.
        // pretty: true,
      },
    },
  ]
};

Search terms

output options pretty cleanOutputDir

Expected Behavior

Options would work when set on output-level.

Actual Behavior

typedoc fails with the error above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasier issue for first time contributorshelp wantedContributions are especially encouraged

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions