Skip to content

Starlight not usable with typescript declarations: true #1612

@alexanderniebuhr

Description

@alexanderniebuhr

What version of starlight are you using?

0.21.1

What version of astro are you using?

4.3.5

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Starlight is not usable if "declaration": true, is set in tsconfig.json.
This option however is mandatory for projects with "composite": true. (Enable constraints that allow a TypeScript project to be used with project references.)

The following issue occurs in src/content/config.ts

The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.(7056)

Potentially related to this is:

colinhacks/zod#1040

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-gx6te3?file=src%2Fcontent%2Fconfig.ts

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    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