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: 🏷️ Add symbolicEqual function to Typescript definitions #3035

Merged
merged 8 commits into from
Oct 25, 2023

Conversation

juancodeaudio
Copy link
Contributor

@juancodeaudio juancodeaudio commented Sep 25, 2023

I've added the symbolicEqual function to the Typescript definitions in 'types.d.ts' inside the MathJsChain interface.

Closes #2960

@josdejong
Copy link
Owner

Thanks Juan!

We need to define the function symbolicEqual twice: once the regular definition, and once for the chained definition. Can you add both definitions? Maybe easiest is to look up the two definitions of the function equal for example to understand the idea.

Also, when you run npm run lint you can check if there are linting issues, and most of them can be fixed automatically by running npm run format.

@josdejong
Copy link
Owner

@juancodeaudio did you see my last comment?

@juancodeaudio
Copy link
Contributor Author

Sure, i'll work on that!!

@juancodeaudio
Copy link
Contributor Author

@josdejong I just added both definitions. As you said, I followed how the "equal" function is defined. Let me know whether it's complete now

@josdejong
Copy link
Owner

Thanks for the update, this is close. The function doesn't accept MathType | string though, but MathNode | string, can you change all occurrences of that? And since the function does not support matrices, it will always return a boolean and not MathCollection.

@juancodeaudio
Copy link
Contributor Author

@josdejong thank you for the feedback. I already changed those types, hope it's ok now.

@josdejong
Copy link
Owner

Thanks for the update, all looks good 👍

@josdejong josdejong merged commit dcbcda8 into josdejong:develop Oct 25, 2023
10 checks passed
@josdejong
Copy link
Owner

Published now in v11.12.0

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.

Missing symbolicEqual from _types/index.d.ts_
2 participants