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

Implement types from units.ts & types.ts #2452

Merged
merged 4 commits into from
Jul 28, 2023

Conversation

allmtz
Copy link
Contributor

@allmtz allmtz commented Jul 28, 2023

Some additional changes related to implementing the mentioned types:

player.ts

  • Adjusted variable names in the summon method for clarity. Also typed the arguments.
  • Addressed type errors in getScore.

creature.ts

  • Typed the obj argument of the constructor.
  • Also added some comments on where the properties of obj are defined.

Tests for creature.ts

  • Added @ts-ignore comments to prevent mocking the entire obj now that it is typed.

Types

  • Created UnitSize & UnitDisplayInfo.
  • Adjusted Movement definition.

a literal union of all the units in `units.ts`
rename `player.summon` variables for clarity

type the `obj` variable of creature constructor
prevents entire mock of `obj` now that it is typed
@vercel
Copy link

vercel bot commented Jul 28, 2023

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

Name Status Preview Updated (UTC)
ancientbeast ✅ Ready (Inspect) Visit Preview Jul 28, 2023 6:48am

@ghost
Copy link

ghost commented Jul 28, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@allmtz allmtz marked this pull request as ready for review July 28, 2023 06:51
@DreadKnight DreadKnight merged commit 9b0fef0 into FreezingMoon:master Jul 28, 2023
3 checks passed
@andretchen0
Copy link
Contributor

Great! Looking forward to trying it out!

@allmtz allmtz deleted the integrate-types branch July 28, 2023 17:24
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.

3 participants