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 isDuplicated type #4

Closed
wants to merge 3 commits into from

Conversation

grigorischristainas
Copy link
Contributor

Hey, nice project!

I open this pull request to refactor isDuplicated type, as I noticed that it is in fact used within HasDuplicatedNames to check for the presence of a Name in Names.

Hope I did not misunderstand its usage and that I am not breaking any additional functionality, but please let me know if any additional changes are required.

@grigorischristainas
Copy link
Contributor Author

Committed a fix for the eslint error.

@dai-shi
Copy link
Member

dai-shi commented Apr 21, 2024

Hi, thanks for trying it out. I added some more tests.

@grigorischristainas
Copy link
Contributor Author

Thank you, I will take another look within the week, otherwise I will close the pull request.

- Simplify logic to check if present in array
- Renamed type to isInArray
- Integrated type in HasDuplicatedNames
- Accepts an array of previous slice configs, following the recursion in
  HasDuplicatedNames, along with the current one
- Utilize Extract util to check for name collisions, as well as InferState
  and new InferStateNames types
@grigorischristainas
Copy link
Contributor Author

Gave it another try, just noticed another similar PR open that seems simpler :) Please feel free to close this one.

@dai-shi
Copy link
Member

dai-shi commented Apr 24, 2024

Yeah, thanks for trying anyway!

@dai-shi dai-shi closed this Apr 24, 2024
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.

2 participants