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

Added TypeScript declaration file and configuration #597

Closed
wants to merge 2 commits into from

Conversation

Aryan-mor
Copy link

This pull request adds a TypeScript declaration file (ical.js.d.ts) for ical.js to enable TypeScript code to be used with ical.js. A tsconfig.json file has also been included to provide TypeScript configuration for the library.

The ical.js.d.ts file contains type definitions for the Component and Event classes and their associated methods, as well as the parse function.

In addition, the tsconfig.json file sets up the TypeScript compiler options required to transpile TypeScript files to JavaScript.

This change will make it easy to use ical.js with TypeScript and provide better type-checking and code completion in editors.

@kewisch
Copy link
Owner

kewisch commented Mar 25, 2024

I'd prefer not to take a manual approach here, since we'd need to maintain two separate file signatures. I'm ok adding some automation that would generate the d.ts from jsdoc, as noted in #367 (comment) . I appreciate you made the effort to send a PR, if you'd like to work out automation based on the jsdoc I'm all for it!

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