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

[types] Remove module augmentation #566

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

MysteryBlokHed
Copy link
Member

@MysteryBlokHed MysteryBlokHed commented Jun 26, 2024

Closes #561
Note: This change is for v0.5 of color.js, hence the target branch being v0.5.x. It should also be implemented before the release of v0.6.0, but that can be done at a later date.

Removes the module augmentation from index.d.ts, instead putting the relevant properties directly into color.d.ts. This should the errors being reported on newer versions of TypeScript.

Removes the module augmentation from `index.d.ts`, instead putting the
relevant properties directly into `color.d.ts`.
@MysteryBlokHed
Copy link
Member Author

@jgerigmeyer Requested review because I'd like to know whether you think there's any better way to do this—imo it seems like module augmentations should just be avoided with the weirdness they seem to have caused.

Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

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

Works great! I agree that this is better than the flaky module augmentation we were using before. 👍

@MysteryBlokHed MysteryBlokHed merged commit c3dce07 into v0.5.x Jun 26, 2024
2 checks passed
@MysteryBlokHed MysteryBlokHed deleted the types/remove-color-augmentation branch June 26, 2024 20:46
MysteryBlokHed added a commit that referenced this pull request Jun 27, 2024
This is essentially the same change as #566, but for the main branch
instead of a patch for v0.5.
MysteryBlokHed added a commit that referenced this pull request Jun 27, 2024
This is essentially the same change as #566, but for the main branch
instead of a patch for v0.5.
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