evaluateBaseHeadless
Unofficial
Evaluate a .base file in headless mode — with no leaf or open view — and return its entries.
It renders the base off-screen via getBasesControllerFromRender, waits for the initial vault scan to settle, then reads the controller’s results. Everything is torn down before returning.
Import:
import { evaluateBaseHeadless } from '@obsidian-typings/obsidian-public-latest/implementations';Signature:
function evaluateBaseHeadless(app: App, content: string, sourcePath: string): Promise<BasesEntry[]>Parameters:
| Parameter | Type | Description |
|---|---|---|
app | App | The app instance. |
content | string | The .base file content (the body of a base code block). |
sourcePath | string | The path supplying the query’s file context. |
Returns: Promise<BasesEntry[]> — The evaluated base entries.