Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set output-specific options #2818

Open
OmarTawfik opened this issue Dec 23, 2024 · 1 comment
Open

Cannot set output-specific options #2818

OmarTawfik opened this issue Dec 23, 2024 · 1 comment
Labels
bug Functionality does not match expectation good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged

Comments

@OmarTawfik
Copy link

OmarTawfik commented Dec 23, 2024

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.

@OmarTawfik OmarTawfik added the bug Functionality does not match expectation label Dec 23, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 23, 2024

Well, that's annoying... I guess I didn't see this because of how I was running TypeDoc when testing, options really shouldn't be frozen anymore, that method should just be removed.

@Gerrit0 Gerrit0 added help wanted Contributions are especially encouraged good first issue Easier issue for first time contributors labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

2 participants