Skip to content

Type error with "declaration": true #119

Open
@BryceRussell

Description

@BryceRussell

If someone authors a theme inside a monorepo with a tsconfig.json that includes "declaration": true, the defineTheme function shows a type error

The inferred type of 'default' cannot be named without a reference to './node_modules/astro-theme-provider/dist/internal/types.js'. This is likely not portable. A type annotation is necessary.

Related issue: microsoft/TypeScript#47663

Workaround: re-export AuthorOptions and UserOptions

need example

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas workaroundBug with a known workaround

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions