Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing java-parser from typescript projects results in error #663

Closed
mshima opened this issue Apr 25, 2024 · 1 comment · Fixed by #664
Closed

Importing java-parser from typescript projects results in error #663

mshima opened this issue Apr 25, 2024 · 1 comment · Fixed by #664

Comments

@mshima
Copy link
Member

mshima commented Apr 25, 2024

Importing java-parser from a typescript project fails to build

import { type CstElement, type CstNode, parse } from 'java-parser';
error TS7016: Could not find a declaration file for module 'java-parser'. '/Volumes/T7/git/java-lint/node_modules/java-parser/src/index.js' implicitly has an 'any' type.
  There are types at '/Volumes/T7/git/java-lint/node_modules/java-parser/api.d.ts', but this result could not be resolved when respecting package.json "exports". The 'java-parser' library may need to update its package.json or typings.
@mshima
Copy link
Member Author

mshima commented Apr 25, 2024

Workaround before next release is to use patch-package:
mshima/java-lint@fe4d212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant