API Reference / @gtkx/codegen / resolveStore
Variable: resolveStore
constresolveStore: (projectRoot) =>ResolvedStore
Defined in: codegen/dist/store/resolve-store.d.ts:26
Resolves where a project's @gtkx/gi and @gtkx/jsx stores belong, from the project root alone. The result supplies every runCodegen input except libraries and girPath, so a caller that has already resolved those can spread it straight into the call.
Store versions come from the installed @gtkx/runtime and @gtkx/react, so a dependency upgrade invalidates the stores. Pass explicit gi or jsx options to runCodegen to override any of it.
Parameters
projectRoot
string
Directory holding the project's package.json and node_modules.
Returns
The store locations and the React subexports that shape the jsx store.
Throws
If @gtkx/runtime cannot be resolved from the project.