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

refactor: transform overlay types from interface to type #2675

Merged
merged 1 commit into from
May 11, 2023

Conversation

csouchet
Copy link
Member

@csouchet csouchet commented May 10, 2023

This pull request proposes a change to the Overlay types.

Previously, these types were defined as interface. The changes suggests moving them to type aliases, aligning with TypeScript's philosophy. This change does not affect the API contract and is aimed at providing a better match to the intended usage of the structures, and a consistent declaration with the StyleUpdate type.

Notes

1st proposed in #2673

According to the TypeScript documentation on "Differences Between Type Aliases and Interfaces", the main distinction is that types cannot be extended.
By using type aliases instead of interface, we ensure that the Overlay types are appropriate for their purpose, as they are not intended to have methods.

@csouchet csouchet added the refactoring Code refactoring label May 10, 2023
@csouchet csouchet marked this pull request as ready for review May 10, 2023 15:30
@csouchet csouchet requested a review from tbouffard May 10, 2023 15:30
@github-actions
Copy link

github-actions bot commented May 10, 2023

♻️ PR Preview 29651c8 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@github-actions
Copy link

github-actions bot commented May 10, 2023

♻️ PR Preview 29651c8 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

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

✔️ Tested with the surge preview environment for the API doc

image

@tbouffard tbouffard merged commit 006f196 into master May 11, 2023
@tbouffard tbouffard deleted the refactor/transform_interface_to_type_for_overlay branch May 11, 2023 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants