fumablox

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) -> ()): Connection

You also do not need @within for function Signal:Connect. A file with a single class owns free functions in that file.

Tags

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.

On this page