Skip to content

refactor: Extract children property into interface #58

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

Merged
merged 2 commits into from
Jun 9, 2025
Merged

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Jun 6, 2025

This PR extracts the common children property into helper interfaces.

  • CssParentNodeCommon - for regular nodes that always have children
  • CssParentNodeCommonPlain - for plain nodes that always have children
  • CssOptionalParentNodeCommon - for regular nodes that sometimes have children
  • CssOptionalParentNodeCommonPlain - for plain nodes that always have children

This makes it easier when people are defining custom node types to quickly ensure their nodes are implementing children the correct way.

No test updates because this is a structural refactor so it doesn't change how the types work, just how they are organized.

@coveralls
Copy link

coveralls commented Jun 6, 2025

Pull Request Test Coverage Report for Build 15536377430

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.611%

Totals Coverage Status
Change from base Build 15471406727: 0.0%
Covered Lines: 11823
Relevant Lines: 11955

💛 - Coveralls

@lumirlumir lumirlumir added this to Triage Jun 7, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Jun 7, 2025
@fasttime fasttime moved this from Needs Triage to Triaging in Triage Jun 8, 2025
@fasttime fasttime moved this from Triaging to Implementing in Triage Jun 8, 2025
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

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

Just a suggestion, otherwise LGTM.

Co-authored-by: Francesco Trotta <github@fasttime.org>
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@fasttime fasttime merged commit 8cee500 into main Jun 9, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

4 participants