reedsy / quill-cursors

A multi cursor module for Quill text editor.
MIT License
250 stars 53 forks source link

Output typescript declaration files #54

Closed vlazh closed 4 years ago

vlazh commented 4 years ago

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

alecgibson commented 4 years ago

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: https://github.com/reedsy/quill-cursors/issues/22

vlazh commented 4 years ago

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

image

alecgibson commented 4 years ago

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 commented 4 years ago

Dist directory image

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

alecgibson commented 4 years ago

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 commented 4 years ago

Can you please also update CHANGELOG.md

vlazh commented 4 years ago

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