Skip to content

Improve EmmyLua export with type ordering and class conversion#10

Merged
YoloWingPixie merged 1 commit into
mainfrom
lua-export-represent-nonglobal-types-as-classes
May 16, 2025
Merged

Improve EmmyLua export with type ordering and class conversion#10
YoloWingPixie merged 1 commit into
mainfrom
lua-export-represent-nonglobal-types-as-classes

Conversation

@YoloWingPixie
Copy link
Copy Markdown
Owner

  • Refactor EmmyLua annotation export: Convert pure record types (non-global data structures) to ---@class with semantic notes for enhanced IDE autocompletion and type introspection. This resolves Poor IDE Introspection for Complex ---@alias Table Structures #8
  • Implement topological sorting of type definitions to ensure dependencies are declared before use, improving language server accuracy. This shouldn't affect runtime but does may LuaLS happier when looking at the output file.
  • Docs: Add comprehensive RST format docstrings to all functions in the lua export script for better maintainability and clarity.

- Refactor EmmyLua annotation export: Convert pure record types (non-global data structures) to `---@class` with semantic notes for enhanced IDE autocompletion and type introspection. This resolves #8
- Implement topological sorting of type definitions to ensure dependencies are declared before use, improving language server accuracy. This shouldn't affect runtime but does may LuaLS happier when looking at the output file.
- Docs: Add comprehensive RST format docstrings to all functions in the lua export script for better maintainability and clarity.
Copilot AI review requested due to automatic review settings May 16, 2025 17:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the EmmyLua export by refactoring type annotations, implementing topological sorting for type definitions, and adding comprehensive docstrings to improve maintainability and IDE support.

  • Converted pure record types to class annotations for better autocompletion.
  • Implemented topological sorting to ensure type dependencies are declared in order.
  • Updated function documentation in RST format for clarity.

@github-actions
Copy link
Copy Markdown

DCS Schema Stats

Metric Count
Types 1
Globals 1
Total Size 410432 bytes

✅ All validation checks passed!

@YoloWingPixie YoloWingPixie merged commit abc5084 into main May 16, 2025
1 check passed
@YoloWingPixie YoloWingPixie deleted the lua-export-represent-nonglobal-types-as-classes branch May 16, 2025 17:58
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.

Poor IDE Introspection for Complex ---@alias Table Structures

2 participants