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

Fix module resolution in typescript #736

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

jannikac
Copy link
Contributor

Hi, I've found another small issue when using typescript with this package. When using the tsconfig options module: "NodeNext" and moduleResolution: "NodeNext", tsc showed the following error:

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

1 import ICAL from "ical";
                   ~~~~~~~
Found 1 error in test.ts:1

This was fixed by b3821e0.

Also I noticed that when using typescript and go to definition VSCode would go to the .d.ts files instead of the js sources. This was fixed by adding the declarationmaps to the package which allow VSCode or another language server to connect the declarations and the source js files. 9401238.

@jannikac jannikac marked this pull request as ready for review July 26, 2024 14:49
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10113229055

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.16%

Totals Coverage Status
Change from base Build 10031055480: 0.0%
Covered Lines: 9454
Relevant Lines: 9616

💛 - Coveralls

@kewisch kewisch merged commit f5385ca into kewisch:main Sep 11, 2024
5 checks passed
@kewisch
Copy link
Owner

kewisch commented Sep 11, 2024

Sorry for the delay on your reviews @jannikac. My attention usually comes in bursts, feel free to ping me if you need anything!

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 this pull request may close these issues.

3 participants