Writing comments
Moonwave-compatible tags, used as annotations — not as the API itself.
Comments are optional. Use them when the compiler cannot know a description, an example, a realm, or a deprecation.
Syntax
Block comments with one equals sign, or consecutive --- lines. Same meaning.
--[=[
@class Signal
A typed observer for game events.
]=]
local Signal = {}Do not repeat the compiler
-- Too much. Types already exist on the function.
--- @param listener (...any) -> ()
--- @return Connection
function Signal:Connect(listener: (...any) -> ()): Connection-- Enough. The signature is inferred; the comment explains.
--- Connects `listener`. Called on [Signal:Fire].
--- @param listener -- invoked with the fire arguments
function Signal:Connect(listener: (...any) -> ()): ConnectionYou also do not need @within for function Signal:Connect. A file with a single class owns free functions in that file.
Tags
| Tag | Purpose |
|---|---|
@class / @module | Name an API page (optional if the module is inferred) |
@within | Attach a member when inference cannot |
@prop / @type / @interface / @field | Data the parser did not see |
@function / @method | Members that do not exist as source |
| Tag | Purpose |
|---|---|
@param / @return / @error | Descriptions (types optional when Luau has them) |
@yields | Yielding function |
@example | Following lines become a Lua sample |
@category | Group on the page |
| Tag | Purpose |
|---|---|
@since / @deprecated / @unreleased | Lifecycle |
@server / @client / @plugin | Realm |
@private / @ignore | Hide from the public site |
@readonly | Property |
@extends | Inheritance |
@external | Link an outside type |
@tag | Badge, and Moonwave-style TOC grouping |
Short links
In any description:
[Signal]→ the class page[Signal:Connect]/[Signal.new]→ a member[Player],[CFrame]→ Roblox engine docs- Types defined on a class (
[Connection]) → that class page’s anchor
Moonwave projects
Keep moonwave.toml. Fumablox maps classOrder, apiCategories, autoSectionPath, git fields, and code. Docusaurus-only tables are ignored.