Skip to content

chore: evaluate removing isolatedDeclarations from tsconfig #3136

Description

@zeroedin

Problem

tsconfig.settings.json sets "isolatedDeclarations": true (line 19), which requires explicit type annotations on all exported declarations.

This contradicts the convention documented in CLAUDE.md:

static styles = [styles] array form

With --isolatedDeclarations enabled, that form produces TS9017:

error TS9017: Only const arrays can be inferred with --isolatedDeclarations.

The actual working form must be:

static readonly styles: CSSStyleSheet[] = [styles];

The sibling project red-hat-design-system does not use --isolatedDeclarations and uses the simpler inferred form without issue.

Question

Should we remove isolatedDeclarations from tsconfig.settings.json to allow the simpler convention, or update CLAUDE.md to document the explicit type annotation requirement?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions