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

Improve TypeScript declarations file #660

Merged
merged 2 commits into from
Nov 28, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/jimp/jimp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,6 @@ declare namespace Jimp {
}
}

declare module 'jimp' {
export = Jimp.Jimp;
}
// @ts-ignore

Choose a reason for hiding this comment

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

No.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand your concern, but please read the corresponding issue as well. Technically the line is not needed as the compiler does not actually compile the type declarations. The ignore is exclusively for those people who open the file in their IDE which would report the structure as invalid. It is however, very much valid; if it wouldn't be then compiling would crash.

declare var exportedJimp = Jimp.Jimp;
export = exportedJimp;