Skip to content

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

Merged
philihp merged 5 commits intomainfrom
game-fix-control-params
Apr 28, 2023
Merged

fix: workaround until ts-pattern has variadic array length matching#280
philihp merged 5 commits intomainfrom
game-fix-control-params

Conversation

@philihp
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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