Skip to content

Conversation

@rzane
Copy link
Contributor

@rzane rzane commented Jan 5, 2026

In this PR, I'm looking to make the code a little bit simpler. These are patterns that I'm looking to remove here:

  1. Type-validation at runtime. This is overly defensive, and complicates testing. Most of these type checks happen in functions that are not public. We can rely on TypeScript to alert us to these misconfigurations.
  2. Using classes when a function would suffice. The only remaining classes are Visitor and Assignment. These are both mutable objects and are exposed via the public API.

This PR does not change the public API.

Please review this PR with "hide whitespace" enabled, since that's the majority of the diff in test files.

/no-platform

@rzane rzane requested a review from samandmoore January 5, 2026 15:31
@rzane rzane marked this pull request as draft January 5, 2026 17:43
@rzane rzane force-pushed the rzane/refactor branch 3 times, most recently from 52f3263 to 3391ad4 Compare January 6, 2026 04:18
Base automatically changed from rzane/config to main January 6, 2026 18:58
@rzane rzane marked this pull request as ready for review January 6, 2026 19:29

Choose a reason for hiding this comment

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

😬

Copy link
Member

@samandmoore samandmoore left a comment

Choose a reason for hiding this comment

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

domainlgtm

we will have to tweak the browser extension based on a few of these changes, but that's no big deal

@rzane rzane merged commit a8a2026 into main Jan 7, 2026
9 checks passed
@rzane rzane deleted the rzane/refactor branch January 7, 2026 15:35
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.

3 participants