Maintains a collection of option declarations split into TypeDoc options and TypeScript options. Ensures options are of the correct type for calling code.

Option Discovery

Since plugins commonly add custom options, and TypeDoc does not permit options which have not been declared to be set, options must be read twice. The first time options are read, a noop logger is passed so that any errors are ignored. Then, after loading plugins, options are read again, this time with the logger specified by the application.

Options are read in a specific order.

  1. argv (0) - Must be read first since it should change the files read when passing --options or --tsconfig.
  2. typedoc-json (100) - Read next so that it can specify the tsconfig.json file to read.
  3. tsconfig-json (200) - Last config file reader, cannot specify the typedoc.json file to read.
  4. argv (300) - Read argv again since any options set there should override those set in config files.

Hierarchy

  • Options

Constructors

Methods

  • Adds the option declarations declared by the TypeDoc and all supported TypeScript declarations.

    Returns void

  • Internal

    Parameters

    • options: Readonly<CompilerOptions>

    Returns CompilerOptions

  • Gets the project references - used in solution style tsconfig setups.

    Returns readonly ProjectReference[]

  • Internal

    Take a snapshot of option values now, used in tests only.

    Parameters

    • snapshot: {
          __optionSnapshot: never;
      }
      • __optionSnapshot: never

    Returns void

  • Sets the compiler options that will be used to get a TS program.

    Parameters

    • fileNames: readonly string[]
    • options: CompilerOptions
    • projectReferences: undefined | readonly ProjectReference[]

    Returns void

  • Internal

    Take a snapshot of option values now, used in tests only.

    Returns {
        __optionSnapshot: never;
    }

    • __optionSnapshot: never

Generated using TypeDoc