l0.MoonCats.Emitter¶
MoonCatsEmitter ¶
Emits LuaLS .d.lua type definitions from parsed module IRs.
Instance methods¶
emit ¶
Emits the definition definition for one parsed module.
| param | type | description |
|---|---|---|
| ir | MoonCatsModuleIR | The module IR produced by the parser. |
| packageSymbols? | MoonCatsPackageSymbols | Cross-module symbol context; omit for single-module runs. |
| diagnostics? | MoonCatsDiagnostics | Collection that receives findings discovered while emitting. |
Returns:
definitionstring— The definition file's text.
Types¶
MoonCatsPackageSymbols ¶
The cross-module context the emitter resolves identifier references against.
| field | type | description |
|---|---|---|
| typeNameByRequireId | table<string, string> |
LuaCATS type name each require identifier's export declares. |
| aliases | table<string, boolean> |
Names of @alias declarations anywhere in the extraction run. |