Skip to content

Add a bunch of type hints - #10227

Open
vaisest wants to merge 3 commits into
PathOfBuildingCommunity:devfrom
vaisest:lots-of-type-hints
Open

Add a bunch of type hints#10227
vaisest wants to merge 3 commits into
PathOfBuildingCommunity:devfrom
vaisest:lots-of-type-hints

Conversation

@vaisest

@vaisestvaisest commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

Adds type hints to a bunch of places. Given the hopeless type checking situation of this program, my intention is more to drop class definitions in places where lots of fields are added so that it's easier to navigate the codebase. For example, defining Output in a couple of places gets like 600 fields included in the type.

Adding ---@param hints with the big types to calc code should make it somewhat easier to notice errors

Some of the types here are sort of wild. For example ModTag seems to be a massive discriminated union that I am definitely not typing myself. I think, if there is more interest in this sort of stuff, it might make sense to type a bunch of things using LLMs as they can be given access to LuaLS and seem to be quite reliable in that case

Steps taken to verify a working solution:

  • There are no real logic changes. Changes should be limited to e.g. breaking up assignments to multiple lines

Link to a build that showcases this PR:

Before screenshot:

After screenshot:

@vaisest
vaisest marked this pull request as ready for review August 15, 2026 07:19
@vaisestvaisest added technical Hidden from release notes pob2 Label for features that should be ported over to PoB-PoE2 labels Aug 15, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pob2Label for features that should be ported over to PoB-PoE2technicalHidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@vaisest