Skip to content

Could not find a declaration file for module 'danfojs/src/index'. (typescript missing type definition) #216

Closed

Description

@halflings

Describe the bug
The Typescript type definition is somehow not found when I import the module.

To Reproduce
I import danfojs (for web) as suggested in the React example, and I get this error:

Could not find a declaration file for module 'danfojs/src/index'.
'[my src directory]/node_modules/danfojs/src/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/danfojs if it exists or add a new declaration (.d.ts) file containing declare module 'danfojs/src/index'; TS7016

1 | import * as dfd from "danfojs/src/index";

Expected behavior
Expected the import to run fine, and type information to be available.

Additional context
Want to use danfojs from a react/typescript-based web app.

Activity

  1. halflings commented on Jul 24, 2021

    @halflings
    ContributorAuthor

    Any update on this? I just tried importing danfo again and still getting the same error about a missing type declaration, even if I see it here in the repo.

  2. risenW commented on Jul 25, 2021

    @risenW
    Member

    Any update on this? I just tried importing danfo again and still getting the same error about a missing type declaration, even if I see it here in the repo.

    @halflings We are currently converting the entire code base to using Typescript. See progress in the PR #235 So give us some time to fix this.

  3. risenW commented on Oct 3, 2021

    @risenW
    Member

    @halflings I recently pushed a new release and updated the types. This should be fixed now. Do test and let me know. I’m closing this issue in the meantime

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions