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

fix: workaround until ts-pattern has variadic array length matching #280

Merged
merged 5 commits into from
Apr 28, 2023

Conversation

philihp
Copy link
Owner

@philihp philihp commented Apr 28, 2023

i'm not really a fan of this

.with(
  [GameCommandEnum.USE],
  [GameCommandEnum.USE, P._],
  [GameCommandEnum.USE, P._, P._],
  complete.USE(state))

and it also craps out after a certain number of params. Ideally there'd be some sort of match with a rest operator to say "i want arrays which begin like this and have any number of params". I guess I could use P.when, but i would rather wait for gvergnaud/ts-pattern#139

@vercel
Copy link

vercel bot commented Apr 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hathora-et-labora ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2023 9:36am

@coveralls
Copy link
Collaborator

coveralls commented Apr 28, 2023

Pull Request Test Coverage Report for Build 4829215966

  • 188 of 188 (100.0%) changed or added relevant lines in 14 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4828108581: 0.0%
Covered Lines: 2878
Relevant Lines: 2878

💛 - Coveralls

@philihp philihp merged commit 6d71bc8 into main Apr 28, 2023
@philihp philihp deleted the game-fix-control-params branch April 28, 2023 09:42
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