Skip to content

Create TypeScript definitions#25

Merged
mifi merged 6 commits intomifi:masterfrom
ivyrze:master
Oct 2, 2025
Merged

Create TypeScript definitions#25
mifi merged 6 commits intomifi:masterfrom
ivyrze:master

Conversation

@ivyrze
Copy link
Copy Markdown
Contributor

@ivyrze ivyrze commented Sep 6, 2025

I added TypeScript support so that those who use it can benefit. I did have to update the ical.js version so that we can link into their provided types. Thanks for your consideration!

@mifi
Copy link
Copy Markdown
Owner

mifi commented Oct 2, 2025

thank you! I've reverted unrelated package-lock.json as well as ical.js upgrade because that could possibly be breaking

@mifi mifi merged commit 4495e46 into mifi:master Oct 2, 2025
6 checks passed
@ivyrze
Copy link
Copy Markdown
Contributor Author

ivyrze commented Oct 8, 2025

Hi @mifi, thank you for the merge! Unfortunately, due to the ical.js downgrade, the types don't appear to be fully functional. TS definitions were not added until 2.1.0, so any references to ical.js objects will be any, and VS Code confirms this when drilling deeper:

import type ICAL from ical.js; Could not find a declaration file for module ical.js. node_modules/ical.js/build/ical.js implicitly has an any type.

I understand the concern about updating to a new major version, but it may be a necessary evil. There is only one breaking change in the 2.0.0 release: adoption of ES6 syntax. ES6 was released over 10 years ago now, so I imagine the impact of this will be minimal. So long as we too note this in the release notes, I would be surprised if anyone turns their nose at it

@mifi
Copy link
Copy Markdown
Owner

mifi commented Oct 9, 2025

Hi, ok I see. Did you test ical expander with ical.js 2 and it seems to be working?

@ivyrze
Copy link
Copy Markdown
Contributor Author

ivyrze commented Feb 3, 2026

Sorry I missed this. Yes I tested with ical.js@2.2.1 and everything worked great. Later versions probably work just as well but I haven't confirmed.

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.

2 participants