Skip to content

Missing declaration file #16

Closed
Closed

Description

@Sehreen22Khan

Could not find a declaration file for module 'chartjs-test-utils'. 'C:/Users/Sehreen Khan/Desktop/Comparison of analytics libraries/AnalyticsComparison/analytics/node_modules/chartjs-test-utils/dist/chartjs-test-utils.js' implicitly has an 'any' type.
Try npm i --save-dev @types/chartjs-test-utils if it exists or add a new declaration (.d.ts) file containing declare module 'chartjs-test-utils';

Activity

  1. kurkle commented on Sep 12, 2026

    @kurkle
    Member

    Still valid, and now fixed in #36: the package ships type declarations, generated from the JSDoc so they stay in step with the implementation.

    Two notes for anyone landing here from a search:

    • On 0.5.x there are no declarations at all; the workaround is the one the error message suggests, a local declare module 'chartjs-test-utils';.
    • From 1.0.0 the package is Vitest-only (feat!: replace Karma and Jasmine with Vitest (v1.0.0) #34), so the typed API is setup({Chart}), acquireChart, createFixtures and the matchers, which are declared as an augmentation of Vitest's Matchers interface — expect(chart).toEqualImageData(...) typechecks once the package is imported.

    🤖 Generated with Claude Code

  2. added a commit that references this issue on Oct 11, 2026
    9bdf0cb
  3. github-actions commented on Oct 11, 2026

    @github-actions

    🎉 This issue has been resolved in version 1.0.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions