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(resolve): Split implementation into distinct Node types #2801

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

gwhitney
Copy link
Collaborator

@gwhitney gwhitney commented Oct 5, 2022

This refactor allows custom resolve methods for different node types
or for newly added node types, as an alternative to #2775.
Adds a test that demonstrates the creating of a (stub) IntervalNode,
as if you were doing interval arithmetic, say, with a custom resolve
method for the new type.

  This refactor allows custom resolve methods for different node types
  or for newly added node types, as an alternative to josdejong#2775.
  Adds a test that demonstrates the creationg of a (stub) IntervalNode,
  as if you were doing interval arithmetic, say, with a custom resolve
  method for the new type.
@gwhitney
Copy link
Collaborator Author

gwhitney commented Oct 5, 2022

P.S. for whomever reviews this: Note that I had to touch typed.js for two reasons:

  1. Previously, Node was not at the end of the list of Node types, where it has to be for specific node-type implementations to take precedence over a generic Node implementation, as we want it to.
  2. The previously internal Set argument in resolve now has to be exposed in the typed-function interface (but I still didn't document it because it is only used for internal cycle detection). But this happens to be the first time a Set has been used in a mathjs typed-function, so I had to add that type.

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.

1 participant