Overview
@param declares the type and optional description of each function parameter. Place one @param per parameter, directly above the function definition.
Syntax
Basic usage
Optional parameters
Add? after the name to mark the parameter as nil in some calls:
Union types
Variadic parameters
Use... as the parameter name for variadic arguments:
Function-type parameters
Table-type parameters
Generic parameters
String-template generic parameters
Use backticks when the parameter is a class-name string:Ttreats"some_text"asstring`T`treats"some_text"as a class/type name
self parameter
GLuaLS types self as the owning class for methods. Annotate only when you want to be explicit:
Interplay with @fileparam
GLuaLS applies file-level defaults from@fileparam, then workspace defaults from gmod.fileParamDefaults. Explicit @param takes highest priority.