-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
Improve types #2447
Improve types #2447
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I believe the linter error is due Prettier not supporting the I could try silencing the linter or bumping the version, @DreadKnight which would you prefer? |
@allmtz, I'm all for bumping Prettier versions if that's what it takes. But I wonder if this ...
... is doing what you want.
|
I believe
It's super useful since it allows for type checking whenever creating a new unit. I checked to make sure there was no casting and doing something like
Using |
@allmtz You can bump the dependencies just fine as long as they don't trigger a chain reaction. If that happens you'll have to deal with it as well ideally. |
Cool. I look forward to checking it out. |
@DreadKnight, I wanted to bring up my comment in #2441 regarding the usage of |
@allmtz My issue before was that there was no consistency between the number, so you had one extra version in your array thingy after. But you could go for the no commas version overall, except the string one for Dark Priests I guess, would simplify editing and such a bit. |
-Created the
UnitDataStructure
type to improve type safety when adding a new unit tounits.ts
-Narrowed the possible values of
CreatureType
to only valid combinations ofcreature.realm + creature.level