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

feat: export types for package @excalidraw/excalidraw 🎉 #3337

Merged
merged 12 commits into from
Mar 30, 2021

Conversation

ad1992
Copy link
Member

@ad1992 ad1992 commented Mar 27, 2021

fixes #2514
pushed here

@vercel
Copy link

vercel bot commented Mar 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/excalidraw/excalidraw/4abcsnKdnjQbFfMNmiFEkyjdoK7B
✅ Preview: https://excalidraw-git-aakansha-types-excalidraw.vercel.app

@dwelle
Copy link
Member

dwelle commented Mar 27, 2021

There are ~73 errors

27 of them can be resolved by including "src" in the tsconfig. Not sure what side effect it'll have.

@ad1992
Copy link
Member Author

ad1992 commented Mar 28, 2021

There are ~73 errors

27 of them can be resolved by including "src" in the tsconfig. Not sure what side effect it'll have.

It will start including the other folders also for example tests, excal-app so I am adding the entry point of package so only those types are included, however excal-app is also getting added now as its shared so that we need to fix in core.

@dwelle
Copy link
Member

dwelle commented Mar 28, 2021

There are ~73 errors

27 of them can be resolved by including "src" in the tsconfig. Not sure what side effect it'll have.

It will start including the other folders also for example tests, excal-app so I am adding the entry point of package so only those types are included, however excal-app is also getting added now as its shared so that we need to fix in core.

Then let's make the global.d.ts into a normal .ts file and start exporting/importing the types where needed.

@dwelle
Copy link
Member

dwelle commented Mar 28, 2021

Add lib in tsconfig-types and Add global.d.ts, and errors down to 39 :)

That also works.

@ad1992 ad1992 marked this pull request as ready for review March 29, 2021 17:09
@ad1992 ad1992 requested a review from dwelle March 29, 2021 17:09
Copy link
Member

@dwelle dwelle left a comment

Choose a reason for hiding this comment

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

Looks good, let's ship it! 🎉

@dwelle
Copy link
Member

dwelle commented Mar 29, 2021

The output is kinda sad — this microsoft/TypeScript#4433 should help, but it'll probably take years to get done :). Though someone made a rollup plugin to accomplish it more or less: microsoft/TypeScript#4433 (comment) — for other time, though.

@ad1992
Copy link
Member Author

ad1992 commented Mar 30, 2021

The output is kinda sad — this microsoft/TypeScript#4433 should help, but it'll probably take years to get done :). Though someone made a rollup plugin to accomplish it more or less: microsoft/TypeScript#4433 (comment) — for other time, though.

Yep will try it out in next PR, also we might wanna publish the types under @types org so will check on the process for that as well.

@ad1992 ad1992 merged commit a6706cf into master Mar 30, 2021
@ad1992 ad1992 deleted the aakansha-types branch March 30, 2021 18:21
@jeremypress
Copy link
Contributor

Awesome! Thanks for this @ad1992

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.

Missing Typescipt typings
3 participants