Skip to content

Improve TypeScript Types for ThemeConfig #11187

@peterpeterparker

Description

@peterpeterparker

Have you read the Contributing Guidelines on issues?

Description

I would like to suggest providing better TypeScript types for ThemeConfig to improve the developer experience.

Has this been requested on Canny?

No response

Motivation

Currently, the ThemeConfig type is defined as:

export type ThemeConfig = {
  [key: string]: unknown;
};

As a result, developers are unable to benefit from IDE IntelliSense when configuring ThemeConfig within docusaurus.config.ts.

Improving the type definition would greatly enhance the DX by enabling better autocompletion, error checking, and documentation directly within the editor.

API design

No response

Have you tried building it?

No response

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions