Unified doc record for functions, methods, and properties. Used both as top-level functions and as class members/metamethods. Properties (non-function type table fields) have params=nil.
@eryxdoc/extract/types Module
Shared type definitions for the documentation extraction pipeline.
API Reference
Types
SignaturePart
type SignaturePart = {
text: string,
typeRef: boolean?,
hoverText: string?,
kind: ("type" | "param" | "punct" | "keyword" | "name" | "plain")?
}
text: string
typeRef: boolean?
hoverText: string?
kind: ("type" | "param" | "punct" | "keyword" | "name" | "plain")?
ParamMeta
type ParamMeta = {
name: string?,
type: string?,
typeParts: { SignaturePart }?,
description: string?
}
name: string?
type: string?
description: string?
ReturnMeta
type: string?
description: string?
SignatureMeta
type SignatureMeta = {
name: string,
owner: string?,
isMethod: boolean?,
generics: { string }?,
params: { ParamMeta }?,
returns: { ReturnMeta }?
}
name: string
owner: string?
isMethod: boolean?
generics: { string }?
OverloadDoc
type OverloadDoc = {
doc: string?,
location: luau.Location,
params: { string }?,
returnStr: string?,
parsedDoc: ParsedDoc?,
yields: boolean,
isMethod: boolean,
selfType: string?,
owner: string?,
generics: { string }?,
signature: string,
signatureFull: string,
signatureParts: { SignaturePart }?,
signatureMeta: SignatureMeta?
}
doc: string?
params: { string }?
returnStr: string?
yields: boolean
isMethod: boolean
selfType: string?
owner: string?
generics: { string }?
signature: string
signatureFull: string
FuncDoc
type FuncDoc = {
name: string,
doc: string?,
location: luau.Location,
params: { string }?,
returnStr: string?,
parsedDoc: ParsedDoc?,
yields: boolean,
isMethod: boolean,
selfType: string?,
owner: string?,
generics: { string }?,
signature: string,
signatureFull: string,
signatureParts: { SignaturePart }?,
signatureMeta: SignatureMeta?,
overloads: { OverloadDoc }?
}
name: string
doc: string?
params: { string }?
returnStr: string?
yields: boolean
isMethod: boolean
selfType: string?
owner: string?
generics: { string }?
signature: string
signatureFull: string
TypeDoc
type TypeDoc = {
name: string,
exported: boolean,
kind: "class" | "table" | "alias",
doc: string?,
extendsTypes: { string }?,
signatureFull: string?,
signatureParts: { SignaturePart }?,
location: luau.Location,
members: { FuncDoc }?,
generics: { string }?,
parsedDoc: ParsedDoc?,
classImplTable: string?,
classMemberTable: string?,
classFieldsType: string?,
isPrimaryExport: boolean?,
metamethods: { FuncDoc }?,
aliasedTypeNode: luau.AstType?
}
name: string
exported: boolean
kind: "class" | "table" | "alias"
doc: string?
extendsTypes: { string }?
signatureFull: string?
generics: { string }?
classImplTable: string?
classMemberTable: string?
classFieldsType: string?
isPrimaryExport: boolean?
ConstDoc
name: string
value: string
doc: string?
groupTitle: string?
owner: string?
ExtractedDocs
type ExtractedDocs = {
types: { TypeDoc },
functions: { FuncDoc },
constants: { ConstDoc },
moduleDescription: string?,
moduleRoot: string?
}
moduleDescription: string?
moduleRoot: string?
RawFuncSig
Internal struct holding everything extracted from an ExprFunction node.
type RawFuncSig = {
params: { string },
paramNames: { string? },
paramTypeParts: { { SignaturePart }? },
paramTypeNodes: { (luau.AstType | luau.AstTypePack)? },
retStr: string?,
retNode: (luau.AstType | luau.AstTypePack)?,
retParts: { SignaturePart }?,
isMethod: boolean,
selfType: string?,
generics: { string }?
}
params: { string }
paramNames: { string? }
retStr: string?
isMethod: boolean
selfType: string?
generics: { string }?