Skip to content

problem with typescript 5.8 #73

Description

@mattsouth

I tried using jse-eval with typescript (5.8) today and saw:

error TS7016: Could not find a declaration file for module 'jse-eval'. '~/Software/project/node_modules/jse-eval/dist/jse-eval.modern.js' implicitly has an 'any' type.
  There are types at '~/Software/project/node_modules/jse-eval/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'jse-eval' library may need to update its package.json or typings.

2 import { parse, evaluate } from 'jse-eval';

I was able to override the path in my tsconfig.json file to get around the issue ...

{
  "compilerOptions": {
    // ...
    "paths": {
      "jse-eval": ["./node_modules/jse-eval/dist/index.d.ts"]
    } /* Specify a set of entries that re-map imports to additional lookup locations. */,
    // ...
}

but it may be worth adjusting the package.json accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions