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

Output typescript declaration files #54

Merged
merged 6 commits into from
Jan 27, 2020
Merged

Output typescript declaration files #54

merged 6 commits into from
Jan 27, 2020

Conversation

vlazh
Copy link
Contributor

@vlazh vlazh commented Jan 27, 2020

Because sources written in typescript it worth nothing to output original declation files.
Typescript users (I am among them) will be happy!

@vlazh vlazh requested a review from pedrosanta January 27, 2020 09:53
@alecgibson
Copy link
Collaborator

Have you actually tried using the produced type definition file? Does it work? I tried this in the past, but ran into issues getting it to work properly with Webpack: #22

@vlazh
Copy link
Contributor Author

vlazh commented Jan 27, 2020

I just tried to compile my project with quill-cursors declaration files, no errors with it.

image

@alecgibson
Copy link
Collaborator

Awesome. Maybe it was the recent Webpack version bump I did. I'll try to test this later today some time. Thanks for the PR!

@vlazh
Copy link
Contributor Author

vlazh commented Jan 27, 2020

Dist directory
image

For ts types used single entrypoint /dist/index.d.ts
Import looks like
image

@alecgibson
Copy link
Collaborator

Okay, had a quick play. Looks great! One small change, please. Can we update index.ts to export the Cursor class as well, in case people need to reference it eg in variable declarations:

export {QuillCursors as default, Cursor};

@alecgibson
Copy link
Collaborator

Can you please also update CHANGELOG.md

@vlazh
Copy link
Contributor Author

vlazh commented Jan 27, 2020

Done. But I don't now how looks CHANGELOG now.

Copy link
Collaborator

@alecgibson alecgibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Thanks for this! Been lurking on my todo list for ages 🙌

@alecgibson alecgibson merged commit 6071eb0 into reedsy:master Jan 27, 2020
@alecgibson alecgibson mentioned this pull request Jan 27, 2020
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.

None yet

2 participants