Skip to content

No TypeScript typings for ESM preset imports (aura, lara, nora) in @primeuix/themes #108

Description

@jensschneider

When using the ESM preset imports like

import Aura from '@primeuix/themes/aura';

TypeScript cannot find any type definitions for these modules in Jest tests (using ts-jest or jest-preset-angular). This leads to errors like:

TS7016: Could not find a declaration file for module '@primeuix/themes/aura'.

There are only .d.ts files for UMD usage, but not for the ESM entrypoints. This makes it hard to use the presets in modern Angular/TypeScript projects without workarounds (custom typings, @ts-expect-error, etc.).

Note:
This problem only occurs in Jest tests. In the regular Angular build, the ESM imports work, but during testing TypeScript cannot resolve the types for the preset modules.

Workaround:
Currently, I have to add my own typings or use @ts-expect-error to silence the error.

Suggestion:
Please add proper .d.ts files for all ESM preset entrypoints in the published npm package.import Aura from '@primeuix/themes/aura';

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