Skip to content

API Reference / @gtkx/codegen / resolveLibraries

Variable: resolveLibraries

const resolveLibraries: (libraries, girPath, isAdwaitaDefault?) => string[]

Defined in: codegen/dist/gir/libraries.d.ts:16

Expands a libraries config value into the GIR identifiers to generate from: the mandatory set alone when nothing is configured, everything installed for "*", and otherwise the given list with the mandatory set prepended.

The mandatory set is "Gtk-4.0", which joins a list that does not already name a Gtk version. Under isAdwaitaDefault it is "Gtk-4.0" and "Adw-1", and it joins "*" as well as an explicit list. Each entry is mandatory by namespace rather than by version, so a list that pins another version of Gtk or Adwaita keeps its pin.

Parameters

libraries

LibrarySelection

girPath

string[]

isAdwaitaDefault?

boolean

Returns

string[]

Throws

If "*" matched no .gir file anywhere on the GIR path.

Released under the MPL-2.0 License.