Narrow aabb types and give generic aliases their type argument

The aabb functions all index the named members, so passing the
shorthand [MapPosition, MapPosition] form would error at runtime. The
annotations now say so.

emmylua requires a type argument on a generic alias, luals did not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassie
2026-08-07 15:31:18 +00:00
co-authored by Claude Opus 5
parent 90f32699c7
commit b9cfbc9036
6 changed files with 48 additions and 43 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ local Selection = {
--- @field player_index number
--- @field selection Selection.Active
--- @type table<string, { [defines.events]: Selection.event_handler[] }>
--- @type table<string, { [defines.events]: Selection.event_handler<any>[] }>
_registered = {},
--- @package