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';
When using the ESM preset imports like
TypeScript cannot find any type definitions for these modules in Jest tests (using ts-jest or jest-preset-angular). This leads to errors like:
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';