API Reference / @gtkx/codegen / ApiReference
Interface: ApiReference
Defined in: packages/codegen/src/docs/api-reference.ts:469
An index over the GIR data a project's bindings are generated from, queryable and renderable as Markdown.
Accessors
girFiles
Get Signature
get girFiles():
string[]
Defined in: packages/codegen/src/docs/api-reference.ts:812
Paths of the .gir files the index was built from, including the ones pulled in as dependencies.
Returns
string[]
inputFiles
Get Signature
get inputFiles():
string[]
Defined in: packages/codegen/src/docs/api-reference.ts:816
Returns
string[]
Methods
hasFreshInputs()
hasFreshInputs():
boolean
Defined in: packages/codegen/src/docs/api-reference.ts:820
Returns
boolean
lookup()
lookup(
query,kind?):ApiLookupResult
Defined in: packages/codegen/src/docs/api-reference.ts:838
Resolves a name to a single symbol and renders its reference page, or to a single member of a class, interface or record and renders that member's section. A symbol name may be bare (Toast) or qualified (Adw.Toast); a member is named after its owner (Gio.File.replaceContentsAsync, File.replaceContentsAsync, or the JSX element AdwToast.title for the class it renders), and a member a class inherits resolves to the ancestor or interface documenting it. Names are matched case-insensitively, and dashes in signal names are optional; a name several symbols or members answer to is reported as ambiguous rather than picked between.
Parameters
query
string
kind?
Restricts the match to one kind, which is how a class and its JSX element, or a signal and a method of the same name, are told apart.
Returns
namespaceOverview()
namespaceOverview(
name):string|undefined
Defined in: packages/codegen/src/docs/api-reference.ts:962
Renders one namespace's Markdown page: its import line and its symbol names grouped by kind. The namespace is matched case-insensitively, and an unindexed one yields undefined.
Parameters
name
string
Returns
string | undefined
namespaces()
namespaces():
ApiNamespaceSummary[]
Defined in: packages/codegen/src/docs/api-reference.ts:903
A summary of every indexed namespace, ordered Adw, Gtk, then alphabetically.
Returns
overview()
overview():
string
Defined in: packages/codegen/src/docs/api-reference.ts:931
Renders the reference's Markdown landing page: every namespace, its import path, and its totals.
Returns
string
search()
search(
options):ApiSymbol[]
Defined in: packages/codegen/src/docs/api-reference.ts:883
Symbols and class, interface and record members whose name matches the query, best first: an exact name beats a prefix, which beats a substring, a symbol beats a member, and shorter names win ties. Members a class takes from an interface are found on the interface. An empty query matches nothing. The first search indexes members, which renders every member section once.
Parameters
options
Returns
symbolNames()
symbolNames(
namespaceName):string[]
Defined in: packages/codegen/src/docs/api-reference.ts:918
Sorted names of everything a namespace contributes, JSX elements included. The namespace is matched case-insensitively, and an unindexed one yields an empty array.
Parameters
namespaceName
string
Returns
string[]
symbols()
symbols(
query?):ApiSymbol[]
Defined in: packages/codegen/src/docs/api-reference.ts:867
Every indexed symbol the query keeps, ordered by namespace (Adw, then Gtk, then alphabetically) and name. Members are searched and looked up, not enumerated here.
Parameters
query?
ApiSymbolQuery = {}